-
Notifications
You must be signed in to change notification settings - Fork 18
Fix for wrapper scripts not being applied in non-interactive environments #85
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
Changes from 1 commit
c298b99
12248b7
e34adf2
47b524b
16c0297
f959bcc
69a5174
0507d68
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| #!/bin/bash | ||
| if [ -f "${HOME}/ado-auth-helper" ]; then | ||
| ARTIFACTS_ACCESSTOKEN=$(${HOME}/ado-auth-helper get-access-token) | ||
| fi |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| #!/bin/bash | ||
| source auth-ado.sh | ||
| source resolve-shim.sh | ||
|
|
||
| # Install artifact credential provider if it is not already installed | ||
| if [ ! -d "${HOME}/.nuget/plugins/netcore" ]; then | ||
| wget -qO- https://aka.ms/install-artifacts-credprovider.sh | bash | ||
| fi | ||
|
|
||
| DOTNET_EXE="$(resolve_shim)" | ||
| VSS_NUGET_ACCESSTOKEN="${ARTIFACTS_ACCESSTOKEN:-}" VSS_NUGET_URI_PREFIXES=REPLACE_WITH_AZURE_DEVOPS_NUGET_FEED_URL_PREFIX ${NUGET_EXE} "$@" | ||
|
abdurriq marked this conversation as resolved.
Outdated
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| #!/bin/bash | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These all (apart from dotnet + nuget) could be auto-generated, since they are identical except in naming. |
||
| source auth-ado.sh | ||
| source resolve-shim.sh | ||
|
|
||
| NPM_EXE="$(resolve_shim)" | ||
| ARTIFACTS_ACCESSTOKEN="${ARTIFACTS_ACCESSTOKEN:-}" ${NPM_EXE} "$@" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| #!/bin/bash | ||
| source auth-ado.sh | ||
| source resolve-shim.sh | ||
|
|
||
| NPX_EXE="$(resolve_shim)" | ||
| ARTIFACTS_ACCESSTOKEN="${ARTIFACTS_ACCESSTOKEN:-}" ${NPX_EXE} "$@" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| #!/bin/bash | ||
| source auth-ado.sh | ||
| source resolve-shim.sh | ||
|
|
||
| # Install artifact credential provider if it is not already installed | ||
| if [ ! -d "${HOME}/.nuget/plugins/netcore" ]; then | ||
| wget -qO- https://aka.ms/install-artifacts-credprovider.sh | bash | ||
| fi | ||
|
|
||
| NUGET_EXE="$(resolve_shim)" | ||
| VSS_NUGET_ACCESSTOKEN="${ARTIFACTS_ACCESSTOKEN:-}" VSS_NUGET_URI_PREFIXES=REPLACE_WITH_AZURE_DEVOPS_NUGET_FEED_URL_PREFIX ${NUGET_EXE} "$@" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| #!/bin/bash | ||
| source auth-ado.sh | ||
| source resolve-shim.sh | ||
|
|
||
| PNPM_EXE="$(resolve_shim)" | ||
| ARTIFACTS_ACCESSTOKEN="${ARTIFACTS_ACCESSTOKEN:-}" ${PNPM_EXE} "$@" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| #!/bin/bash | ||
| source auth-ado.sh | ||
| source resolve-shim.sh | ||
|
|
||
| PNPX_EXE="$(resolve_shim)" | ||
| ARTIFACTS_ACCESSTOKEN="${ARTIFACTS_ACCESSTOKEN:-}" ${PNPX_EXE} "$@" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| #!/bin/bash | ||
| [[ ${RESOLVE_SHIMS_IMPORTED} == "true" ]] && return | ||
| RESOLVE_SHIMS_IMPORTED=true | ||
|
Comment on lines
+2
to
+3
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Useful to avoid the function being redefined according to Copilot. Probably unnecessary. |
||
|
|
||
| resolve_shim() { | ||
| # Find the next non-shim executable in PATH so we do not run the shim again | ||
| shim_file=$(readlink -f "${BASH_SOURCE[1]}") | ||
| echo $(which -a dotnet | grep -vx "$shim_file" | head -n 1) | ||
|
abdurriq marked this conversation as resolved.
Outdated
|
||
| } | ||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.