Skip to content

Commit ff03f2a

Browse files
move the add permission command into the javascript
1 parent cde8955 commit ff03f2a

3 files changed

Lines changed: 22 additions & 5 deletions

File tree

.github/workflows/set-up-stackql.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,4 @@ jobs:
2525

2626
- name: Validate Stackql Version
2727
run: |
28-
find ~ -name stackql -exec chmod +x {} \;
2928
stackql --version

dist/index.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6708,7 +6708,7 @@ const path = __nccwpck_require__(1017);
67086708
const io = __nccwpck_require__(9631);
67096709
const core = __nccwpck_require__(4695);
67106710
const tc = __nccwpck_require__(3203);
6711-
6711+
const { execSync } = __nccwpck_require__(2081);
67126712

67136713

67146714
const urls = {
@@ -6739,12 +6739,21 @@ async function downloadCLI(){
67396739
}
67406740
}
67416741

6742+
async function addPermission(){
6743+
try {
6744+
execSync("find ~ -name stackql -exec chmod +x {} \\;");
6745+
console.log("Successfully gave execute permission to stackql");
6746+
} catch (error) {
6747+
console.error(`Error: ${error.message}`);
6748+
}
6749+
}
6750+
67426751
async function setup(){
67436752

67446753
const path = await downloadCLI()
67456754

67466755
core.addPath(path)
6747-
6756+
await addPermission()
67486757
}
67496758

67506759
(async () => {

index.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const path = require('path');
66
const io = require('@actions/io');
77
const core = require('@actions/core');
88
const tc = require('@actions/tool-cache');
9-
9+
const { execSync } = require("child_process");
1010

1111

1212
const urls = {
@@ -37,12 +37,21 @@ async function downloadCLI(){
3737
}
3838
}
3939

40+
async function addPermission(){
41+
try {
42+
execSync("find ~ -name stackql -exec chmod +x {} \\;");
43+
console.log("Successfully gave execute permission to stackql");
44+
} catch (error) {
45+
console.error(`Error: ${error.message}`);
46+
}
47+
}
48+
4049
async function setup(){
4150

4251
const path = await downloadCLI()
4352

4453
core.addPath(path)
45-
54+
await addPermission()
4655
}
4756

4857
(async () => {

0 commit comments

Comments
 (0)