@@ -48,6 +48,8 @@ async function run() {
48
48
const installedPath = await installFlutterGen ( version , cacheEnabled , cacheKey , cachePath ) ;
49
49
info ( `FlutterGen installed: ${ installedPath } ` ) ;
50
50
51
+ await makeExecutable ( join ( installedPath , 'fluttergen' ) ) ;
52
+
51
53
await execa ( 'fluttergen' , [ '--version' ] , { stdio : 'inherit' } ) ;
52
54
53
55
setOutput ( 'version' , version ) ;
@@ -96,7 +98,6 @@ async function installFlutterGen(
96
98
const hitCacheKey = await restoreCache ( [ cachePath ] , cacheKey ) ;
97
99
if ( hitCacheKey ) {
98
100
info ( `Restored FlutterGen from cache: ${ cachePath } ` ) ;
99
- addPath ( cachePath ) ;
100
101
return cachePath ;
101
102
}
102
103
}
@@ -125,7 +126,6 @@ async function installFlutterGen(
125
126
const downloadPath = await downloadTool ( downloadUrl ) ;
126
127
127
128
const extractDir = await extractTar ( downloadPath , cachePath ) ;
128
- addPath ( extractDir ) ;
129
129
130
130
if ( cacheEnabled ) {
131
131
await saveCache ( [ extractDir ] , cacheKey ) ;
@@ -135,4 +135,9 @@ async function installFlutterGen(
135
135
return extractDir ;
136
136
}
137
137
138
+ async function makeExecutable ( fluttergenPath : string ) : Promise < void > {
139
+ await execa ( 'chmod' , [ '+x' , fluttergenPath ] ) ;
140
+ addPath ( fluttergenPath ) ;
141
+ }
142
+
138
143
run ( ) ;
0 commit comments