EasyAbp / AbpHelper.CLI

Providing code generation and more features to help you develop applications and modules with the ABP framework.
MIT License
285 stars 95 forks source link

Can't install on mac #133

Closed rexhxiao closed 3 years ago

rexhxiao commented 3 years ago

$HOME/.dotnet/tools/abphelper module add EasyAbp.Abp.SettingUi -d "/Users/rex/test/MyCompany.MyProduct/aspnet-core" --shared --domain --entity-framework-core --contracts --application --http-api --client --web

Running... [02:46:23 INF] Use directory: /Users/rex/test/MyCompany.MyProduct/aspnet-core [02:46:24 INF] Command 'add' started.

[02:46:25 DBG] ProjectInfoProviderStep Input [excludeDirectories]: [02:46:25 DBG] ProjectInfoProviderStep Output [projectInfo]: 'BaseDirectory: /Users/rex/Projects/MyCompany.MyProduct/aspnet-core, FullName: MyCompany.MyProduct, Name: MyProduct, TemplateType: Application, UiFramework: RazorPages, Tiered: False' [02:46:25 DBG] RunCommandStep Input [command]: 'cd /d /Users/rex/Projects/MyCompany.MyProduct/aspnet-core/src/MyCompany.MyProduct.Domain.Shared && dotnet add package EasyAbp.Abp.SettingUi.Domain.Shared' [02:46:25 ERR] /bin/bash: line 0: cd: /d: No such file or directory [02:46:25 ERR] Error while invoking activity activity-13 of workflow 7ef4586e1890494294b7dba3fce1a2f2 EasyAbp.AbpHelper.Steps.Common.RunningCommandFailedException: Exception of type 'EasyAbp.AbpHelper.Steps.Common.RunningCommandFailedException' was thrown. at EasyAbp.AbpHelper.Steps.Common.RunCommandStep.OnExecuteAsync(WorkflowExecutionContext context, CancellationToken cancellationToken) in D:\Repos\EasyAbp\AbpHelper.CLI\src\AbpHelper\Steps\Common\RunCommandStep.cs:line 28 at Elsa.Services.ActivityInvoker.InvokeAsync(WorkflowExecutionContext workflowContext, IActivity activity, Func2 invokeAction) [02:46:25 ERR] Error activity: { "Command": { "Syntax": "JavaScript", "Expression": "cd /d ${AspNetCoreDir}/src/${ProjectInfo.FullName}.${CurrentValue} && dotnet add package ${Option.ModuleName}.${CurrentValue}`", "Type": "System.String, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" }, "Name": null }

wakuflair commented 3 years ago

ABPHelper needs the root folder as the -d option. Try again with -d "/Users/rex/test/MyCompany.MyProduct"

rexhxiao commented 3 years ago

The problem is not supporting the command "cd /d " on mac os !

wakuflair commented 3 years ago

Oh I didn't know that, I need to look for a workround. Before that, you can try to run the command directly under the project folder, so that you can omit the -d option.

wakuflair commented 3 years ago

By the way, this issue is related to ABPHelper.CLI, so I transfered the issue.

rexhxiao commented 3 years ago

Oh I didn't know that, I need to look for a workround. Before that, you can try to run the command directly under the project folder, so that you can omit the -d option.

It is executed automatically by the abphelpe command and change directory problem is still the same.