Commit Graph

490 Commits

Author SHA1 Message Date
Andrea Jemmett
9363fb2f72
fix: Nushell plugin list --urls (#1507) 2023-03-23 01:23:53 +00:00
Edwin Kofler
3379af845e
fix!: rework POSIX entrypoint for greater shell support (#1480) 2023-03-21 05:06:57 +00:00
Edwin Kofler
e0fd7a7be8
fix: enforce & use consistent function definitions (#1464) 2023-01-29 14:52:22 +11:00
Edwin Kofler
d81b81f9de
fix: Remove == inside [ (#1421)
* lint(checkstyle): Miscellaneous tweaks
* lint(checkstyle): Add 'no-double-equals' rule
* lint: Remove double equals from `[`
* chore: Remove final double equals

Co-authored-by: Trevor Brown <Stratus3D@users.noreply.github.com>
2023-01-14 08:18:44 -05:00
Edwin Kofler
670c96d1a6
fix: Allow path: versions to use ~ (#1403) 2023-01-06 07:08:48 -05:00
Trevor Brown
4125d2b556
fix: correct order of checks in conditional for adding a missing newline (#1418)
We need to add trailing newlines to .tool-versions file before appending
a new version to the file. The order of the checks was wrong here as the
first check assumed the file existed, and the second checked if it did.
Switching them fixes the issue.

This fix was provided by @h3y6e

Fixes #1417
2023-01-05 09:39:53 -05:00
Trevor Brown
8aa060ade9
Merge branch 'master' into improve-pwd 2023-01-04 09:49:11 -05:00
Edwin Kofler
dd37b6f0c0
fix: Do not use pwd 2022-12-30 01:57:49 -08:00
Edwin Kofler
f522ab9879
fix: Remove usage of $(pwd) in favor of $PWD 2022-12-30 01:57:35 -08:00
James Hegedus
ea26947c0e
chore: bump dev deps (#1398)
* chore: bump dev deps
* chore: fix shellcheck warnings

Co-authored-by: Trevor Brown <admin@stratus3d.com>
2022-12-29 15:24:24 -05:00
Edwin Kofler
196a05b2dc
fix: force lwrcase plugin name fix capitalization mismatch errs (#1400)
Co-authored-by: Trevor Brown <Stratus3D@users.noreply.github.com>
Closes https://github.com/asdf-vm/asdf/issues/816
2022-12-29 13:12:47 +11:00
Edwin Kofler
3492043241
fix: lint errors from scripts/checkstyle.py (#1385)
Co-authored-by: James Hegedus <jthegedus@hey.com>
2022-12-23 20:53:22 +11:00
James Hegedus
ea18e96bc0
ci: explicitly set shell in lint & format scripts (#1391) 2022-12-23 20:40:11 +11:00
James Hegedus
ab9d4b126a
chore: remove unused var in lib/functions/installs.bash (#1389) 2022-12-22 08:54:05 +11:00
Dylan Chong
5af7625769
fix: reshim did not rewrite executable path (#1311)
Co-authored-by: James Hegedus <jthegedus@hey.com>
Fixes https://github.com/asdf-vm/asdf/issues/1115
Fixes https://github.com/asdf-vm/asdf/issues/1231
Fixes https://github.com/asdf-vm/asdf/issues/1286
2022-12-21 08:25:34 +11:00
Edwin Kofler
15faf93a0d
fix: Remove unecessary backslashes (#1384) 2022-12-20 15:54:00 -05:00
Edwin Kofler
ec972cbdf0
fix: Ban use of 'test' (#1383) 2022-12-19 08:08:38 -05:00
Lorenzo Gallucci
5334d1db3d
fix: excludes "milestone" releases in "latest" command (#1307)
Fixes #1306
2022-07-25 16:05:09 -04:00
Trevor Brown
eb7dac3a2b
fix: append trailing newline to .tool-versions files when missing (#1310)
If a .tool-versions file did not end with a newline new tools and
versions would get appended to the same line rather than properly
added on a new line in the file

Fixes #1299
2022-07-25 09:23:43 -04:00
Josh Soref
eaf2215cb8
chore: Fix spelling (#1289)
chore: Fix spelling
2022-07-05 09:40:33 -04:00
Jonathan Beverly (jrbeverly)
18caea3eb7
feat: Disable short-name repository with config value (#1227)
Co-authored-by: jthegedus <jthegedus@hey.com>
2022-06-28 09:47:49 +10:00
botp
5ea67953be
feat: mark current resolved versions in asdf list output (#762)
Co-authored-by: botp <botpena@example.com>
Co-authored-by: James Hegedus <jthegedus@hey.com>
2022-06-21 22:54:02 +10:00
Kimiaki Kuno
b9962f7156
fix: get invalid ASDF_DATA_DIR when exec asdf shims by non-shell (#1154)
* fix: get invalid ASDF_DATA_DIR when exec asdf shims by non-shell

asdf_data_dir function inits ASDF_DATA_DIR with HOME when value is empty.
HOME may replace to empty string when asdf shims called by non-shell program.
this makes invalid value of ASDF_DATA_DIR.
2022-06-08 12:54:53 -04:00
Trevor Brown
92d005dacd
fix: update plugin-add regex to support other languages (#1241)
[:alpha:] and [:digit:] character classes support characters from other
languages whereas ranges like a-z and 0-9 may not.

Fixes #1237
2022-06-07 08:43:02 -04:00
Trevor Brown
711ad99104
fix: always use ASDF_DEFAULT_TOOL_VERSIONS_FILENAME for filename when present (#1238)
* fix: always use ASDF_DEFAULT_TOOL_VERSIONS_FILENAME for filename when present
* fix: correct version command unit tests for ASDF_DEFAULT_TOOL_VERSIONS_FILENAME

Fixes #1082
2022-05-27 07:50:04 -04:00
Trevor Brown
788ccab597
fix: only iterate over directories in the plugins/ directory (#1228)
Fixes part of #1029
2022-05-12 07:48:54 -04:00
Ignacio El Kadre
91136234e9 fix: instead /tmp, use TMPDIR if defined 2022-05-09 08:09:27 -04:00
Trevor Brown
39909e01af
fix: add asdf to list of banned commands (#1224)
Ban recusive asdf calls as they are inefficient and may introduce bugs.
If you find yourself needing to invoke an `asdf` command from within
asdf code, please source the appropriate file and invoke the
corresponding function.
2022-05-06 09:21:06 -04:00
Trevor Brown
27f7ef7852
fix: don't invoke asdf inside asdf commands (#1208)
* fix: don't invoke asdf inside asdf commands

Recursive calls have a number of disadvantages:

* Poorer performance since each invocation spawns and new process and re-executes all the code in bin/asdf
* Makes debugging more difficult
* More likely to introduce subtle bugs and the possibility for infinite loops
2022-04-25 08:45:19 -04:00
Trevor Brown
448f750891
fix: local plugin in then clause too (#1203)
Co-authored-by: Kazuhiro NISHIYAMA <znz@users.noreply.github.com>
2022-04-14 11:10:17 -04:00
Bo Lopker
de6e22f909
fix: remove comments from whole file instead of line by line for performance (#1198) 2022-04-08 10:44:07 -04:00
David le Blanc
afd6224298 Fixed config file parsing to handle "=" in value field. 2022-01-27 11:20:08 -05:00
Trevor Brown
87137e4103
fix: Ban ls command (#1141)
* Ban `ls` command
* Update banned commands test so it only checks bash and sh files
* Only allow `ls` for resolving symlinks
* Replace `ls` commands with `find`
2021-12-29 12:10:39 -05:00
Jochen Schalanda
e61e3d9ade
feat: case-insensitive filtering of unstable versions in latest (#1139)
* feat: case-insensitive filtering of unstable versions in `latest`
* Fix versions in version_commands tests
2021-12-29 08:50:06 -05:00
Yves Blusseau
288468f93f
fix: don't generate on error if backup file doesn't exists (#1057)
Signed-off-by: JrCs <90z7oey02@sneakemail.com>
2021-12-23 11:43:41 -05:00
Alberto de Murga
aafe1e5304
fix: latest --all correctly report plugins as missing (#1118) 2021-12-09 16:49:24 +11:00
Alberto de Murga
f85fef533f
feat(latest): adds the flag --all to the latest command (#1096) 2021-12-05 23:41:27 +11:00
nozaq
5992abb09e
fix: do not print find errors (#1102) 2021-12-05 19:21:57 +11:00
Jonas Thuresson
234778a397
fix: shorthand grep options for alpine support (#1106)
Co-authored-by: James Hegedus <jthegedus@hey.com>
2021-12-05 18:40:19 +11:00
Elijah
cc7778a040
feat: Elvish Shell support (#1066) 2021-11-18 21:05:27 +11:00
Trevor Brown
4b93bc81aa
fix: Sed improvements (#1087) 2021-11-15 19:03:53 +11:00
Chris Rose
41162849cf
fix: clarify the wording when no version is set (#1088)
Co-authored-by: Chris Rose <offline@offby1.net>
Co-authored-by: jthegedus <jthegedus@hey.com>
2021-11-14 14:35:42 +11:00
Radon Rosborough
c911f2d431
fix: Fix plugin-test arg parsing (#1084) 2021-11-08 09:40:53 +11:00
Radon Rosborough
69ff2d0c9a
fix: Quote commands correctly in plugin-test (#1078)
* fix: Quote commands correctly in plugin-test
* make it posix compliant
* default to $SHELL
2021-11-02 09:48:26 -04:00
Max Nordlund
847ec73751
fix: Use more idiomatic fish (#1042)
The use of `.` is deprecated in fish, unlike POSIX shells. We can avoid
calling `psub` and pipe directly into source which does the same thing.

https://fishshell.com/docs/current/cmds/source.html
2021-10-07 09:20:41 -04:00
Alberto de Murga
9430a39aef
feat: Displays a warning when a plugin from the tools-version list does not exist (#1033)
* feat: Displays a warning when the plugin from the tools-version does not exist

When calling the install command, it tried to look for versions for all
the plugins available and installed them. With this change, it will attempt to
find versions for all the installed plugins and plugins defined in the
`.tool-versions`.

Fixes https://github.com/asdf-vm/asdf/issues/574

* feat: Changes the algorithm to detect not installed plugins

This patch changes the algorithm. It preserves the original logic for
the plugin resolution, but at the same time, reports entries with plugins not
available.

* fix: Addresses the pull request comments.

- Changes the comparison to be strict rather than partial.
- Prints a list of missing plugins.
- Exists if at least one plugin is not present.
- Adds unit tests.
2021-10-01 08:38:57 -04:00
Yasunori Fujie
304f72dbb2
feat: add post update plugin support (#1049)
Co-authored-by: James Hegedus <jthegedus@hey.com>
2021-09-24 08:53:52 +10:00
Yasunori Fujie
3e0cb9aaea
fix: help for extension commands for plugins with hyphens in the name. (#1048)
* test: add test for plugin command list in asdf help
* fix: help for plugins containing hyphens
2021-09-23 14:47:26 -04:00
Yasunori Fujie
7e1f2a0d93
fix: wait until the plugin update are finished (#1037) 2021-09-14 09:44:53 -04:00
Filip Chabik
47e8fb051b
fix: sed re error trailing backslash on FreeBSD (#1046). (#1047) 2021-09-13 09:16:13 -04:00