Repository navigation
fix: squad init no longer runs git init in subdirectory; az CLI Windows shell fix - #946
Merged
bradygaster merged 1 commit intoApr 12, 2026
Conversation
…ws shell fix - squad init: remove automatic git init when CWD is inside a parent git repo (monorepo case). Now shows a warning and advises running from the git root. Closes github#939 - Azure DevOps adapter: use shell: IS_WINDOWS for all execFileSync('az', ...) calls so the .cmd wrapper script resolves correctly on Windows. Also convert assertAzCliAvailable from execSync to execFileSync for consistency. Closes github#941 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes two platform-specific bugs in Squad’s CLI init flow and Azure DevOps SDK adapter to avoid unintended git repo nesting in monorepos and restore Windows compatibility for az CLI execution.
Changes:
- Removed the
squad initbehavior that rangit initwhen executed in a subdirectory of an existing parent repo; now it only warns/suggests running from the git root. - Updated Azure DevOps adapter
azCLI invocations to useshell: trueon Windows (viashell: IS_WINDOWS) and switched the CLI-availability check toexecFileSync. - Documented both fixes in
CHANGELOG.md.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/squad-sdk/src/platform/azure-devops.ts | Adds Windows-aware exec options for az calls and replaces execSync with execFileSync for the availability check. |
| packages/squad-cli/src/cli/core/init.ts | Stops auto-running git init in subdirectories; replaces it with guidance to run init from the git root. |
| CHANGELOG.md | Notes both bug fixes under Unreleased → Fixed. |
karlis-balcers
pushed a commit
to karlis-balcers/squad
that referenced
this pull request
Apr 13, 2026
…#941 (PR github#946) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
karlis-balcers
pushed a commit
to karlis-balcers/squad
that referenced
this pull request
Apr 13, 2026
…#941 (PR github#946) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
tamirdresher
pushed a commit
that referenced
this pull request
Apr 21, 2026
…ws shell fix (#946) - squad init: remove automatic git init when CWD is inside a parent git repo (monorepo case). Now shows a warning and advises running from the git root. Closes #939 - Azure DevOps adapter: use shell: IS_WINDOWS for all execFileSync('az', ...) calls so the .cmd wrapper script resolves correctly on Windows. Also convert assertAzCliAvailable from execSync to execFileSync for consistency. Closes #941 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two targeted bug fixes:
squad init: Squad init should not run git init in a sub-folder of a repository (or ever) #939 — squad init no longer runs
git initin monorepo subdirectoriesWhen
squad initdetected CWD was inside a parent git repo (e.g. a monorepo subfolder), it would automatically rungit initto create a nested repo boundary. This caused unexpected nested git repos. Now it just warns and advises the user to run from the git root.fix(sdk): Add shell: IS_WINDOWS to ADO adapter execFileSync calls #941 — Azure DevOps adapter uses
shell: trueon Windows forazCLI callsOn Windows,
azis a.cmdwrapper script.execFileSync('az', ...)withoutshell: truefails to resolve it. AddedIS_WINDOWS = process.platform === 'win32'constant andAZ_OPTS = {...EXEC_OPTS, shell: IS_WINDOWS}applied to allazexec calls. Also convertedassertAzCliAvailablefromexecSynctoexecFileSyncfor consistency.Why
squad init(squad init: Squad init should not run git init in a sub-folder of a repository (or ever) #939).cmdwrapper not resolving (fix(sdk): Add shell: IS_WINDOWS to ADO adapter execFileSync calls #941)How
git initblock; replace with a clear message pointing to the git rootIS_WINDOWS+AZ_OPTSconstants; apply to all 4azexec callsTesting
npm run buildnpx vitest run(pre-existing failures in docs-build and cli-packaging-smoke unrelated)Closes #939
Closes #941