File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -106,10 +106,19 @@ async function resolveVersionInput(): Promise<string> {
106
106
return version ;
107
107
}
108
108
109
- const versionFilePath = path . join ( process . env . GITHUB_WORKSPACE || "" , versionFile || ".python-version" ) ;
110
- version = await fs . readFile ( versionFilePath , "utf8" ) ;
111
- core . info ( `Resolved ${ versionFile } as ${ version } ` ) ;
112
- return version ;
109
+ try {
110
+ const versionFilePath = path . join ( process . env . GITHUB_WORKSPACE || "" , versionFile || ".perl-version" ) ;
111
+ version = await fs . readFile ( versionFilePath , "utf8" ) ;
112
+ core . info ( `Resolved ${ versionFile } as ${ version } ` ) ;
113
+ return version ;
114
+ } catch ( err ) {
115
+ if ( ( err as any ) ?. code !== "ENOENT" || versionFile ) {
116
+ throw err ;
117
+ }
118
+ }
119
+
120
+ // use the default version.
121
+ return "5" ;
113
122
}
114
123
115
124
run ( ) ;
You can’t perform that action at this time.
0 commit comments