You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 12, 2020. It is now read-only.
constchocoPath=path_1.join(`${process.env.ChocolateyInstall}`,'lib',`${tool}.${version}`,'tools',tool==='ghc' ? `${tool}-${chocoPathVersion}` : `${tool}-${version}`,// choco trims the ghc version here
11086
-
tool==='ghc' ? 'bin' : '');
11081
+
constchocoPath=getChocoPath(tool,version);
11087
11082
constlocations={
11088
11083
stack: [],
11089
11084
cabal: {
@@ -11188,14 +11183,8 @@ async function choco(tool, version) {
11188
11183
],{
11189
11184
ignoreReturnCode: true
11190
11185
});
11191
-
// Manually add the path because it won't happen until the end of the step normally
11192
-
constpathArray=version.split('.');
11193
-
constpathVersion=pathArray.length>3
11194
-
? pathArray.slice(0,pathArray.length-1).join('.')
11195
-
: pathArray.join('.');
11196
-
constchocoPath=path_1.join(`${process.env.ChocolateyInstall}`,'lib',`${tool}.${version}`,'tools',tool==='ghc' ? `${tool}-${pathVersion}` : `${tool}-${version}`,// choco trims the ghc version here
11197
-
tool==='ghc' ? 'bin' : '');
11198
-
core.addPath(chocoPath);
11186
+
// Add to path automatically because it does not add until the end of the step.
11187
+
core.addPath(getChocoPath(tool,version));
11199
11188
}
11200
11189
asyncfunctionghcupBin(os){
11201
11190
constv='0.1.8';
@@ -11215,6 +11204,16 @@ async function ghcup(tool, version, os) {
11215
11204
if(returnCode===0&&tool==='ghc')
11216
11205
awaitexec_1.exec(bin,['set',version]);
11217
11206
}
11207
+
functiongetChocoPath(tool,version){
11208
+
// Manually add the path because it won't happen until the end of the step normally
11209
+
constpathArray=version.split('.');
11210
+
constpathVersion=pathArray.length>3
11211
+
? pathArray.slice(0,pathArray.length-1).join('.')
11212
+
: pathArray.join('.');
11213
+
constchocoPath=path_1.join(`${process.env.ChocolateyInstall}`,'lib',`${tool}.${version}`,'tools',tool==='ghc' ? `${tool}-${pathVersion}` : `${tool}-${version}`,// choco trims the ghc version here
0 commit comments