Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed command existence check #1633

Merged
merged 3 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/e2e-harness-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
yarn bootstrap
- name: Run
run: |
cd packages/app-harness && yarn run:ios-test & sleep 480
cd packages/app-harness && yarn run:ios-test & sleep 540
- name: E2E
run: |
cd packages/app-harness && yarn e2e:ios && kill $(lsof -t -i:8092)
Expand Down
8 changes: 2 additions & 6 deletions packages/app-harness/renative.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,7 @@
"repositories": ["def customVar1 = '1'"],
"ext": ["playServicesLocationVersion = \"21.0.1\""]
},
"injectAfterAll": [
"allprojects {",
" repositories {",
" }",
"}"
]
"injectAfterAll": ["allprojects {", " repositories {", " }", "}"]
},
"styles_xml": {
"tag": "resources",
Expand Down Expand Up @@ -133,6 +128,7 @@
}
}
},

"rn-fetch-blob": "source:rnv",
"react-native-carplay": "source:rnv",
"@react-native-community/push-notification-ios": "source:rnv",
Expand Down
4 changes: 1 addition & 3 deletions packages/core/src/system/exec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -499,9 +499,7 @@
if (fileNotExistsSync(commandName)) {
try {
const stdout = execSync(
`command -v ${cleanedCommandName} 2>/dev/null` +
`&& ${cleanedCommandName} --version 2>/dev/null` +
` && { echo >&1 ${cleanedCommandName}; exit 0; }`
`command -v ${cleanedCommandName} 2>/dev/null` + ` && { echo >&1 ${cleanedCommandName}; exit 0; }`

Check warning

Code scanning / CodeQL

Unsafe shell command constructed from library input Medium

This string concatenation which depends on
library input
is later used in a
shell command
.
This string concatenation which depends on
library input
is later used in a
shell command
.
);
return !!stdout;
} catch (error) {
Expand Down
Loading