8000 Use GetFullPath for working directory · dotnet-script/dotnet-script@49fef69 · GitHub
[go: up one dir, main page]

Skip to content

Commit 49fef69

Browse files
committed
Use GetFullPath for working directory
1 parent a354c09 commit 49fef69

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Dotnet.Script.DependencyModel/Context/DotnetRestorer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ public void Restore(ProjectFileInfo projectFileInfo, string[] packageSources)
2626
var packageSourcesArgument = CreatePackageSourcesArguments();
2727
var configFileArgument = CreateConfigFileArgument();
2828
var runtimeIdentifier = _scriptEnvironment.RuntimeIdentifier;
29-
var workingDirectory = Path.GetDirectoryName(projectFileInfo.Path);
29+
var workingDirectory = Path.GetFullPath(Path.GetDirectoryName(projectFileInfo.Path));
3030

3131

3232
_logger.Debug($"Restoring {projectFileInfo.Path} using the dotnet cli. RuntimeIdentifier : {runtimeIdentifier} NugetConfigFile: {projectFileInfo.NuGetConfigFile}");
33+
3334
var exitcode = _commandRunner.Execute("dotnet", $"restore \"{projectFileInfo.Path}\" -r {runtimeIdentifier} {packageSourcesArgument} {configFileArgument}", workingDirectory);
34-
//var exitcode = _commandRunner.Execute("dotnet", $"restore \"{projectFileInfo.Path}\" -r {runtimeIdentifier} {packageSourcesArgument} {configFileArgument}");
3535
if (exitcode != 0)
3636
{
3737
// We must throw here, otherwise we may incorrectly run with the old 'project.assets.json'

0 commit comments

Comments
 (0)
0