File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,6 +60,8 @@ func main() {
6060 return
6161 }
6262
63+ fmt .Println ("README.md copied" )
64+
6365 err = copyFile (
6466 "./scripts/templates/install-manager.mjs" ,
6567 outDir ,
@@ -71,7 +73,21 @@ func main() {
7173 return
7274 }
7375
74- fmt .Println ("README.md copied" )
76+ fmt .Println ("install-manager.mjs copied" )
77+
78+ err = copyFile (
79+ "./scripts/templates/bin.mjs" ,
80+ outDir ,
81+ "bin.mjs" ,
82+ )
83+
84+ if err != nil {
85+ fmt .Println ("[ERROR] [copy bin.mjs] " , err )
86+ return
87+ }
88+
89+ fmt .Println ("bin.mjs copied" )
90+
7591}
7692
7793func getDistFolderPath () (string , error ) {
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env node
2+
3+ import { execSync } from "child_process" ;
4+ import { fileURLToPath } from "url" ;
5+ import path from "path" ;
6+
7+ const __filename = fileURLToPath ( import . meta. url ) ;
8+ const __dirname = path . dirname ( __filename ) ;
9+
10+ const fullPath = path . join ( __dirname , "bin/node-versions-cli" ) ;
11+
12+ // Get the arguments passed to the script, excluding the first two elements
13+ // The first element is the path to the node executable
14+ // The second element is the path to your script
15+ const args = process . argv . slice ( 2 ) ;
16+
17+ // Join the arguments into a single string
18+ const argsString = args . join ( " " ) ;
19+
20+ execSync ( `${ fullPath } ${ argsString } ` , { stdio : "inherit" } ) ;
Original file line number Diff line number Diff line change 22 "name" : " @raulfdm/node-versions" ,
33 "private" : false ,
44 "bin" : {
5- "node-versions" : " ./ bin/node-versions "
5+ "node-versions" : " bin.mjs "
66 },
77 "publishConfig" : {
88 "access" : " public"
You can’t perform that action at this time.
0 commit comments