Skip to content

Commit

Permalink
Add DOTNET_ROOT (#12)
Browse files Browse the repository at this point in the history
* Add DOTNET_ROOT

* Correct path

* DOTNET_ROOT should point at root, not versioned folder
  • Loading branch information
Danny McCormick authored Aug 23, 2019
1 parent 56ad7c6 commit 1c11308
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/installer.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ class DotnetCoreInstaller {
else {
console.log('Using cached tool');
}
// Need to set this so that .NET Core global tools find the right locations.
core.exportVariable('DOTNET_ROOT', path.join(toolPath, '../..'));
// Prepend the tools path. instructs the agent to prepend for future tasks
core.addPath(toolPath);
});
Expand Down
4 changes: 4 additions & 0 deletions src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ export class DotnetCoreInstaller {
console.log('Using cached tool');
}

// Need to set this so that .NET Core global tools find the right locations.
core.exportVariable('DOTNET_ROOT', path.join(toolPath, '../..'));

// Prepend the tools path. instructs the agent to prepend for future tasks
core.addPath(toolPath);
}
Expand Down Expand Up @@ -171,6 +174,7 @@ export class DotnetCoreInstaller {
this.version,
this.arch
);

console.log('Successfully installed', this.version);
return cachedDir;
}
Expand Down

0 comments on commit 1c11308

Please sign in to comment.