Skip to content

Multi version support#2393

Closed
HerrTopi wants to merge 549 commits intomasterfrom
multi_version_support
Closed

Multi version support#2393
HerrTopi wants to merge 549 commits intomasterfrom
multi_version_support

Conversation

@HerrTopi
Copy link
Contributor

@HerrTopi HerrTopi commented Feb 3, 2026

No description provided.

svc-instui and others added 30 commits February 2, 2026 23:23
to test:
this code should render a button with fully
rounded corners

```
<Button
  themeOverride={{borderRadius: '100px'}}
>sdfdsf</Button>
```

check theme override pages in the docs

function bootstrap() {
execSync(path.resolve('scripts/clean.js'), opts)

Check warning

Code scanning / CodeQL

Shell command built from environment values Medium

This shell command depends on an uncontrolled
absolute path
.

Copilot Autofix

AI 11 days ago

In general, the correct fix is to avoid passing dynamically constructed paths as part of a shell command string. Instead, use execFileSync (or an equivalent API) where the executable and each argument are provided in a separate array element, so no shell is involved, or explicitly run node with the script path as an argument. This ensures that spaces and special characters in the path are passed literally to the child process rather than being interpreted by a shell.

For this specific case in scripts/bootstrap.js, the cleanest change is to replace execSync(path.resolve('scripts/clean.js'), opts) with a call that runs node on that script using execFileSync. We already import execSync and fork from child_process; we can extend that import to also include execFileSync. Then, in bootstrap(), we call execFileSync(process.execPath, [path.resolve('scripts/clean.js')], opts). process.execPath is the absolute path of the Node binary running this script, so this reliably executes the local scripts/clean.js file without going through a shell. No other behavior of the script changes, and the existing opts with { stdio: 'inherit' } is reused so output behavior stays the same. All other uses of execSync in this file are hard-coded string commands without dynamic paths and can remain as they are per the recommendation.

Concretely:

  • Update the require('child_process') destructuring to also import execFileSync.
  • Replace the execSync(path.resolve('scripts/clean.js'), opts) line in bootstrap() with an execFileSync call using process.execPath and the resolved script path as its argument array.
Suggested changeset 1
scripts/bootstrap.js

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/scripts/bootstrap.js b/scripts/bootstrap.js
--- a/scripts/bootstrap.js
+++ b/scripts/bootstrap.js
@@ -24,7 +24,7 @@
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
-const { execSync, fork } = require('child_process')
+const { execSync, execFileSync, fork } = require('child_process')
 const path = require('path')
 
 const opts = { stdio: 'inherit' }
@@ -65,7 +65,7 @@
 }
 
 function bootstrap() {
-  execSync(path.resolve('scripts/clean.js'), opts)
+  execFileSync(process.execPath, [path.resolve('scripts/clean.js')], opts)
   buildProject()
 }
 
EOF
@@ -24,7 +24,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
const { execSync, fork } = require('child_process')
const { execSync, execFileSync, fork } = require('child_process')
const path = require('path')

const opts = { stdio: 'inherit' }
@@ -65,7 +65,7 @@
}

function bootstrap() {
execSync(path.resolve('scripts/clean.js'), opts)
execFileSync(process.execPath, [path.resolve('scripts/clean.js')], opts)
buildProject()
}

Copilot is powered by AI and may make mistakes. Always verify output.
@github-actions
Copy link

github-actions bot commented Feb 3, 2026

PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-02-04 16:46 UTC

@HerrTopi HerrTopi self-assigned this Feb 3, 2026
@matyasf matyasf closed this Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants