Skip to content

Commit

Permalink
Merge branch 'master' into stingrayza/verbose-batch-install
Browse files Browse the repository at this point in the history
  • Loading branch information
jthegedus authored Oct 7, 2024
2 parents 83e00a9 + c5116dc commit ad4e81c
Show file tree
Hide file tree
Showing 14 changed files with 1,517 additions and 459 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
node-version: "20"

- name: Cache dependencies
uses: actions/cache@v3
uses: actions/cache@v4
id: npm-cache
with:
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/semantic-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
semantic-pr:
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5.4.0
- uses: amannn/action-semantic-pull-request@v5.5.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: dorny/paths-filter@v2
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
with:
node-version: "18"

- uses: actions/cache@v3
- uses: actions/cache@v4
id: npm-cache
with:
path: |
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [0.14.1](https://github.com/asdf-vm/asdf/compare/v0.14.0...v0.14.1) (2024-08-15)


### Patches

* Only display the "can't keep downloads" warning when asked to keep downloads ([#1756](https://github.com/asdf-vm/asdf/issues/1756)) ([44f3efb](https://github.com/asdf-vm/asdf/commit/44f3efb63b7517520f4610d504d30783a85c9d79))

## [0.14.0](https://github.com/asdf-vm/asdf/compare/v0.13.1...v0.14.0) (2024-01-19)


Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ not covered under this security policy.**
<!-- x-release-please-start-version -->

```
0.14.0
0.14.1
```

<!-- x-release-please-end -->
Expand Down
2 changes: 1 addition & 1 deletion docs/contribute/core.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ bats test/list_commands.bash

The following is the `.gitignore` file in the `asdf-vm/asdf` repository. We ignore project-specific files. Files specific to your OS, tools or workflows should be ignored in your global `.gitignore` configuration, [see here](http://stratus3d.com/blog/2018/06/03/stop-excluding-editor-temp-files-in-gitignore/) for more details.

@[code](../../.gitignore)
<<< @/../.gitignore

### `.git-blame-ignore-revs`

Expand Down
2 changes: 1 addition & 1 deletion docs/guide/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ asdf primarily requires `git` & `curl`. Here is a _non-exhaustive_ list of comma


```shell
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.0
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.1

```

Expand Down
1,914 changes: 1,475 additions & 439 deletions docs/package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"preview": "vitepress preview"
},
"devDependencies": {
"@types/node": "^20.8.10",
"prettier": "^3.0.3",
"vitepress": "^1.0.0-rc.24"
"@types/node": "^22.7.4",
"prettier": "^3.3.3",
"vitepress": "^1.3.4"
}
}
2 changes: 1 addition & 1 deletion docs/pt-br/guide/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ asdf primarily requires `git` & `curl`. Here is a _non-exhaustive_ list of comma
<!-- x-release-please-start-version -->

```shell
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.0
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.1
```

<!-- x-release-please-end -->
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-hans/guide/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ asdf primarily requires `git` & `curl`. Here is a _non-exhaustive_ list of comma
<!-- x-release-please-start-version -->

```shell
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.0
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.1
```

<!-- x-release-please-end -->
Expand Down
11 changes: 6 additions & 5 deletions lib/functions/installs.bash
Original file line number Diff line number Diff line change
Expand Up @@ -236,15 +236,16 @@ install_tool_version() {

local install_exit_code=$?
if [ $install_exit_code -eq 0 ] && [ $download_exit_code -eq 0 ]; then
# Remove download directory if --keep-download flag or always_keep_download config setting are not set
# If the download directory should be kept, but isn't available, warn the user
always_keep_download=$(get_asdf_config_value "always_keep_download")
if [ ! "$keep_download" = "true" ] && [ ! "$always_keep_download" = "yes" ]; then
if [ -d "$download_path" ]; then
rm -r "$download_path"
else
if [ "$keep_download" = "true" ] || [ "$always_keep_download" = "yes" ]; then
if [ ! -d "$download_path" ]; then
printf '%s\n' "asdf: Warn: You have configured asdf to preserve downloaded files (with always_keep_download=yes or --keep-download). But" >&2
printf '%s\n' "asdf: Warn: the current plugin ($plugin_name) does not support that. Downloaded files will not be preserved." >&2
fi
# Otherwise, remove the download directory if it exists
elif [ -d "$download_path" ]; then
rm -r "$download_path"
fi

reshim_command "$plugin_name" "$full_version"
Expand Down
18 changes: 16 additions & 2 deletions test/install_command.bats
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ setup() {
install_dummy_legacy_plugin
install_dummy_plugin
install_dummy_broken_plugin
install_dummy_plugin_no_download

PROJECT_DIR="$HOME/project"
mkdir -p "$PROJECT_DIR"
Expand Down Expand Up @@ -302,11 +303,24 @@ EOM
[ "$output" = "Download failed!" ]
}

@test "install_command prints info message if plugin does not support preserving download data if configured" {
install_dummy_plugin_no_download
@test "install_command prints info message if plugin does not support preserving download data if --keep-download flag is provided" {
run asdf install dummy-no-download 1.0.0 --keep-download
[ "$status" -eq 0 ]

[[ "$output" == *'asdf: Warn:'*'not be preserved'* ]]
}

@test "install_command prints info message if plugin does not support preserving download data if always_keep_download setting is true" {
echo 'always_keep_download = yes' >"$HOME/.asdfrc"
run asdf install dummy-no-download 1.0.0
[ "$status" -eq 0 ]

[[ "$output" == *'asdf: Warn:'*'not be preserved'* ]]
}

@test "install_command does not print info message if --keep-download flag is not provided and always_keep_download setting is false" {
run asdf install dummy-no-download 1.0.0
[ "$status" -eq 0 ]

[[ "$output" != *'asdf: Warn:'*'not be preserved'* ]]
}
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.14.0
0.14.1

0 comments on commit ad4e81c

Please sign in to comment.