Open sunghwan2789 opened 1 year ago
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.
I can create a pull request on this. Should I just remove that entire if-test then? Or have a specific handling of pnpm command?
As a workaround, I could invoke the shell with launch commands:
<SpaProxyLaunchCommand>pnpm i && pnpm dev</SpaProxyLaunchCommand>
<SpaProxyLaunchCommand Condition="$([MSBuild]::IsOsPlatform('Windows'))">cmd.exe /s /c $(SpaProxyLaunchCommand)</SpaProxyLaunchCommand>
<SpaProxyLaunchCommand Condition="$([MSBuild]::IsOSUnixLike())">sh -c '$(SpaProxyLaunchCommand)'</SpaProxyLaunchCommand>
Hello @javiercn , would amending the following code:
https://github.com/dotnet/aspnetcore/blob/589aa11b5c631ce719e0530d66be8324a6d79169/src/Middleware/Spa/SpaProxy/src/SpaProxyLaunchManager.cs#L169-L176
To something that checks for both .cmd
and .exe
files within the working directory and then allocating the relevant command.extension
be feasible to hopefully future proof this case against .exe files ?
if (OperatingSystem.IsWindows() && !Path.HasExtension(command))
{
var commandWithCmdExtension = $"{command}.cmd";
var commandWithExeExtension = $"{command}.exe";
if (File.Exists(Path.Combine(WorkingDirectory, commandWithCmdExtension)))
{
command = commandWithCmdExtension;
}
else if (File.Exists(Path.Combine(WorkingDirectory, commandWithExeExtension)))
{
command = commandWithExeExtension;
}
}
Hello @javiercn , would amending the following code:
To something that checks for both
.cmd
and.exe
files within the working directory and then allocating the relevantcommand.extension
be feasible to hopefully future proof this case against .exe files ?if (OperatingSystem.IsWindows() && !Path.HasExtension(command)) { var commandWithCmdExtension = $"{command}.cmd"; var commandWithExeExtension = $"{command}.exe"; if (File.Exists(Path.Combine(WorkingDirectory, commandWithCmdExtension))) { command = commandWithCmdExtension; } else if (File.Exists(Path.Combine(WorkingDirectory, commandWithExeExtension))) { command = commandWithExeExtension; } }
Hello @javiercn just looking for a follow up on this. Many thanks
Given a ASP.NET project with SPA setup:
SpaProxyLaunchManager
failes to launch SPA development server, saying it cannot find 'pnpm.cmd':It makes sense because, using a pnpm installation standalone script, we do not have
pnpm.cmd
, but onlypnpm.exe
at%localappdata%\pnpm\
.I know I can use pnpm modifying
SpaProxyLaunchCommand
to have the extension likepnpm.exe dev
,https://github.com/dotnet/aspnetcore/blob/589aa11b5c631ce719e0530d66be8324a6d79169/src/Middleware/Spa/SpaProxy/src/SpaProxyLaunchManager.cs#L169-L174
but it would be great if we could omit it.