File tree 2 files changed +11
-6
lines changed
2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -63602,17 +63602,17 @@ function run() {
63602
63602
core.debug(`add bin ${added}`);
63603
63603
core.info(`Successfully set up Go version ${versionSpec}`);
63604
63604
}
63605
+ let goPath = yield io.which('go');
63606
+ let goVersion = (child_process_1.default.execSync(`${goPath} version`) || '').toString();
63605
63607
if (cache && cache_utils_1.isCacheFeatureAvailable()) {
63606
63608
const packageManager = 'default';
63607
63609
const cacheDependencyPath = core.getInput('cache-dependency-path');
63608
- yield cache_restore_1.restoreCache(versionSpec , packageManager, cacheDependencyPath);
63610
+ yield cache_restore_1.restoreCache(parseGoVersion(goVersion) , packageManager, cacheDependencyPath);
63609
63611
}
63610
63612
// add problem matchers
63611
63613
const matchersPath = path_1.default.join(__dirname, '../..', 'matchers.json');
63612
63614
core.info(`##[add-matcher]${matchersPath}`);
63613
63615
// output the version actually being used
63614
- const goPath = yield io.which('go');
63615
- const goVersion = (child_process_1.default.execSync(`${goPath} version`) || '').toString();
63616
63616
core.info(goVersion);
63617
63617
core.setOutput('go-version', parseGoVersion(goVersion));
63618
63618
core.startGroup('go env');
Original file line number Diff line number Diff line change @@ -56,19 +56,24 @@ export async function run() {
56
56
core . info ( `Successfully set up Go version ${ versionSpec } ` ) ;
57
57
}
58
58
59
+ let goPath = await io . which ( 'go' ) ;
60
+ let goVersion = ( cp . execSync ( `${ goPath } version` ) || '' ) . toString ( ) ;
61
+
59
62
if ( cache && isCacheFeatureAvailable ( ) ) {
60
63
const packageManager = 'default' ;
61
64
const cacheDependencyPath = core . getInput ( 'cache-dependency-path' ) ;
62
- await restoreCache ( versionSpec , packageManager , cacheDependencyPath ) ;
65
+ await restoreCache (
66
+ parseGoVersion ( goVersion ) ,
67
+ packageManager ,
68
+ cacheDependencyPath
69
+ ) ;
63
70
}
64
71
65
72
// add problem matchers
66
73
const matchersPath = path . join ( __dirname , '../..' , 'matchers.json' ) ;
67
74
core . info ( `##[add-matcher]${ matchersPath } ` ) ;
68
75
69
76
// output the version actually being used
70
- const goPath = await io . which ( 'go' ) ;
71
- const goVersion = ( cp . execSync ( `${ goPath } version` ) || '' ) . toString ( ) ;
72
77
core . info ( goVersion ) ;
73
78
74
79
core . setOutput ( 'go-version' , parseGoVersion ( goVersion ) ) ;
You can’t perform that action at this time.
0 commit comments