Repository navigation
feat(clone): add --yes so the bash path can run unattended like the PowerShell one - #375
Open
jlinenkohl wants to merge 1 commit into
Open
jlinenkohl wants to merge 1 commit into
jlinenkohl wants to merge 1 commit into
Conversation
…owerShell one Clone-Agent.ps1 takes -Force. clone-agent.sh has no equivalent, so the only way to drive it unattended is to pipe something into stdin -- and that stdin is inherited by every child process it spawns. Both available workarounds fail. Piping a single line leaves the later `read` at EOF, which `set -e` turns into a silent exit before deployment. Piping an endless stream, `yes | ./clone-agent.sh ...`, makes `az rest` hang indefinitely: the same call returns in two seconds with stdin on /dev/null and never returns when stdin is an endless stream. Two export runs stalled for over two hours on a single GET that normally takes two seconds, with no output and no error. That is easy to mistake for the bash path simply being slow, which it is not -- the PowerShell path completed the same export unattended because -Force meant nothing had to be piped at it. -y / --yes / --force skips the prompt directly, so stdin can stay closed.
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.
Clone-Agent.ps1 takes -Force. clone-agent.sh has no equivalent, so the only way to drive it unattended is to pipe something into stdin -- and that stdin is inherited by every child process it spawns.
Both available workarounds fail. Piping a single line leaves the later
readat EOF, whichset -eturns into a silent exit before deployment. Piping an endless stream,yes | ./clone-agent.sh ..., makesaz resthang indefinitely: the same call returns in two seconds with stdin on /dev/null and never returns when stdin is an endless stream. Two export runs stalled for over two hours on a single GET that normally takes two seconds, with no output and no error.That is easy to mistake for the bash path simply being slow, which it is not -- the PowerShell path completed the same export unattended because -Force meant nothing had to be piped at it.
-y / --yes / --force skips the prompt directly, so stdin can stay closed.