Open
Conversation
Add support for `-h` or `--help` cli flag and print the supported options. Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
azureauth publishes linux deb files since v0.8.2. Add linux/x64 and linux/arm64 to the supported configuration list so that ado-npm-auth can be used there. Scripts/install.js relies on dpkg-deb to unpack the deb file, which is fine since the binaries are built for/on Ubuntu where dpkg-deb is guaranteed to be available. The linux binaries might run on other distros.
When running headless on linux we can't rely on web flow for authentication. Add a cli argument that forces azureauth into devicecode flow to support that scenario. Move from running azureauth with `exec` to `spawn` to make this work. We need to use spawn so that stderr can be inherited from the calling process. The device code is displayed to the user on stderr. Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
dannyvv
reviewed
Aug 1, 2024
| deviceCode: boolean; | ||
| } | ||
|
|
||
| export function printHelp() { |
Member
There was a problem hiding this comment.
I'm working on a change #31 to add a config file support.
I'm planning to leverage yargs to do the argument parsing.
Just sharing we'll likely hit a merge conflict. If you happen to be the one you'll know what PR to look at :)
Member
Author
There was a problem hiding this comment.
thanks for the heads up, i have no problem with rebasing and reworking this to rely on yargs.
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.
This PR adds support for running
ado-npm-authon Linux natively (not in WSL). This has two parts:azureauthon Linux by unpacking the deb file that is published for every release