Skip to content
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

tools: use mktemp to create the workspace directory #38432

Closed
wants to merge 1 commit into from

Conversation

lpinca
Copy link
Member

@lpinca lpinca commented Apr 27, 2021

On some platforms, the TMPDIR environment variable is not set.

@github-actions github-actions bot added the tools Issues and PRs related to the tools directory. label Apr 27, 2021
tools/update-npm.sh Outdated Show resolved Hide resolved
echo "Deleting temporary workspace"

rm -rf "$WORKSPACE"
tar zxf "$WORKSPACE"/cli/release/npm-"$NPM_VERSION".tgz
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realize this comes from the previous implementation, but the use of the quotes seems… weird. I think we're supposed to put the whole argument inside one string.

Suggested change
tar zxf "$WORKSPACE"/cli/release/npm-"$NPM_VERSION".tgz
tar zxf "${WORKSPACE}/cli/release/npm-${NPM_VERSION}.tgz"

or

Suggested change
tar zxf "$WORKSPACE"/cli/release/npm-"$NPM_VERSION".tgz
tar zxf "$WORKSPACE/cli/release/npm-$NPM_VERSION.tgz"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is done in multiple places so I would not change it here. I think it's better to use another PR/commit to eventually make it consistent in the whole script.

On some platforms, the TMPDIR environment variable is not set.
@lpinca
Copy link
Member Author

lpinca commented May 3, 2021

Landed in 63c9b5b.

lpinca added a commit that referenced this pull request May 3, 2021
On some platforms, the TMPDIR environment variable is not set.

PR-URL: #38432
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
@lpinca lpinca closed this May 3, 2021
@lpinca lpinca deleted the use/mktemp branch May 3, 2021 12:50
targos pushed a commit that referenced this pull request May 3, 2021
On some platforms, the TMPDIR environment variable is not set.

PR-URL: #38432
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
@targos targos mentioned this pull request May 3, 2021
targos pushed a commit that referenced this pull request May 30, 2021
On some platforms, the TMPDIR environment variable is not set.

PR-URL: #38432
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
targos pushed a commit that referenced this pull request Jun 5, 2021
On some platforms, the TMPDIR environment variable is not set.

PR-URL: #38432
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
targos pushed a commit that referenced this pull request Jun 5, 2021
On some platforms, the TMPDIR environment variable is not set.

PR-URL: #38432
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
targos pushed a commit that referenced this pull request Jun 11, 2021
On some platforms, the TMPDIR environment variable is not set.

PR-URL: #38432
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants