File tree 2 files changed +11
-8
lines changed 2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -66920,17 +66920,18 @@ async function restoreAsdfCache() {
66920
66920
});
66921
66921
const toolVersionsHash = crypto4.createHash("sha256").update(toolVersions).digest("hex");
66922
66922
core3.debug(`Tool versions hash: ${toolVersionsHash}`);
66923
- const asdfVersionOutput = await exec5.getExecOutput("asdf", ["-- version"]);
66924
- const asdfVersion = asdfVersionOutput.stdout.trim().replace("asdf version", "") ;
66923
+ const asdfVersionOutput = await exec5.getExecOutput("asdf", ["version"]);
66924
+ const asdfVersion = asdfVersionOutput.stdout.trim();
66925
66925
core3.debug(`asdf version: ${asdfVersion}`);
66926
- const cacheKey = `asdf-${asdfVersion}-${toolVersionsHash}`;
66926
+ const cacheKeyPrefix = `asdf-${asdfVersion}-`;
66927
+ const cacheKey = `${cacheKeyPrefix}${toolVersionsHash}`;
66927
66928
core3.debug(`cache key: ${cacheKey}`);
66928
66929
const paths = [
66929
66930
`${process2.env.ASDF_DIR}/plugins`,
66930
66931
`${process2.env.ASDF_DIR}/installs`
66931
66932
];
66932
66933
const restoreKeys = [
66933
- "asdf-tools-"
66934
+ cacheKeyPrefix
66934
66935
];
66935
66936
core3.debug(`Restoring ${paths.join(", ")} from cache with key "${cacheKey}" using restore keys "${restoreKeys.join(", ")}"`);
66936
66937
return cache.restoreCache(paths, cacheKey, restoreKeys);
Original file line number Diff line number Diff line change @@ -19,11 +19,13 @@ async function restoreAsdfCache() {
19
19
20
20
core . debug ( `Tool versions hash: ${ toolVersionsHash } ` ) ;
21
21
22
- const asdfVersionOutput = await exec . getExecOutput ( 'asdf' , [ '-- version' ] ) ;
23
- const asdfVersion = asdfVersionOutput . stdout . trim ( ) . replace ( 'asdf version' , '' ) ;
22
+ const asdfVersionOutput = await exec . getExecOutput ( 'asdf' , [ 'version' ] ) ;
23
+ const asdfVersion = asdfVersionOutput . stdout . trim ( ) ;
24
24
25
25
core . debug ( `asdf version: ${ asdfVersion } ` ) ;
26
- const cacheKey = `asdf-${ asdfVersion } -${ toolVersionsHash } ` ;
26
+
27
+ const cacheKeyPrefix = `asdf-${ asdfVersion } -` ;
28
+ const cacheKey = `${ cacheKeyPrefix } ${ toolVersionsHash } ` ;
27
29
28
30
core . debug ( `cache key: ${ cacheKey } ` ) ;
29
31
@@ -32,7 +34,7 @@ async function restoreAsdfCache() {
32
34
`${ process . env . ASDF_DIR ! } /installs` ,
33
35
] ;
34
36
const restoreKeys = [
35
- `asdf-tools- ${ asdfVersion } -` ,
37
+ cacheKeyPrefix ,
36
38
] ;
37
39
38
40
core . debug ( `Restoring ${ paths . join ( ', ' ) } from cache with key "${ cacheKey } " using restore keys "${ restoreKeys . join ( ', ' ) } "` ) ;
You can’t perform that action at this time.
0 commit comments