mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-15 06:35:20 -07:00
Use storkExecutablePath
This commit is contained in:
parent
c1b097c279
commit
3d663c8da4
1 changed files with 10 additions and 5 deletions
|
|
@ -24,7 +24,7 @@ const execDownloadUrls = {
|
||||||
console.log( 'execDownloadUrl', execDownloadUrl )
|
console.log( 'execDownloadUrl', execDownloadUrl )
|
||||||
|
|
||||||
// Delete any existing executable
|
// Delete any existing executable
|
||||||
await fs.remove( storkExecutableName )
|
await fs.remove( storkExecutablePath )
|
||||||
|
|
||||||
// Download the executable
|
// Download the executable
|
||||||
await execa( `curl`, [
|
await execa( `curl`, [
|
||||||
|
|
@ -34,13 +34,18 @@ const execDownloadUrls = {
|
||||||
storkExecutableName
|
storkExecutableName
|
||||||
])
|
])
|
||||||
|
|
||||||
// const stat = await fs.stat( storkExecutableName )
|
|
||||||
// console.log( 'stat', stat )
|
|
||||||
|
|
||||||
// Make sure the executable is executable
|
// Make sure the executable is executable
|
||||||
await fs.chmod( storkExecutableName, '755' )
|
await fs.chmod( storkExecutablePath, '755' )
|
||||||
|
|
||||||
const output = await execa( storkExecutableName, [
|
const stats = await fs.stat( storkExecutablePath )
|
||||||
|
const isExecutable = !!(stats.mode & fs.constants.S_IXUSR)
|
||||||
|
console.log( 'isExecutable', isExecutable )
|
||||||
|
|
||||||
|
// const access = await fs.access( storkExecutablePath, fs.constants.X_OK)
|
||||||
|
// console.log('access', access)
|
||||||
|
|
||||||
|
const output = await execa( storkExecutablePath, [
|
||||||
'--version'
|
'--version'
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue