Commit Graph

106 Commits

Author SHA1 Message Date
Daniel Perez
11882c1151
Merge pull request #382 from fcrespo82/better-which-command
Updated which command.
2018-11-29 00:18:51 +00:00
Trevor Brown
22b709f94e
Merge pull request #403 from burnettk/support-tool-versions-without-newline
support .tool-versions content even if it does not end in a newline
2018-11-20 09:18:41 -05:00
Kevin Burnett
f1b2c59b1d support .tool-versions if it does not end in newline 2018-11-15 21:47:48 -05:00
Fernando Crespo
03394831a8 Merge remote-tracking branch 'upstream/master' into better-which-command 2018-11-12 15:35:19 -02:00
Daniel Perez
18587d4d6f Fix current behavior when multiple versions of a plugin are set 2018-11-10 11:32:02 +00:00
Trevor Brown
359191104b
Merge pull request #389 from mig4/where-default-version-to-current
Make where command default to current version
2018-11-03 10:07:44 -04:00
mig4
a58e9e3c17
Make where command default to current version
Allow not specifying the version on command line in which case fall back
to looking it up.

Also add tests for the `where` command.
2018-10-28 17:47:21 +00:00
mig4
f994b07a2c
Optimise listing all plugins
When checking if a plugin is installed (to display a flag) it is not
necessary to loop through all installed plugins, since we already have
a name we can check directly.

Also expand test case to test this code path too.
2018-10-27 20:05:02 +01:00
Fernando Crespo
46e5f7427f Updated which command.
Should fix #205
2018-10-21 00:47:13 -03:00
Trevor Brown
60e67c4f5b Add primitive tests for plugin_test_command. 2018-10-19 22:44:26 -04:00
Trevor Brown
fc078c5e72 Implement 'asdf local -p'. 2018-10-19 20:41:49 -04:00
Trevor Brown
e8905b42bc Add tests for 'asdf local -p' command. 2018-10-19 20:41:49 -04:00
Trevor Brown
f708e3c15f
Merge pull request #371 from phunehehe/version-set-by
commands/current: add space before parenthesis
2018-10-10 18:21:46 -04:00
Hoang Xuan Phu
1330083229 commands/current: add space before parenthesis
It seems to have been lost in 88d47bbd69.
Probably by accident?

I also pulled the literal bits into the format string. It looks more
readable to me that way. I'm happy to remove that if it's not desired.
2018-10-10 17:28:23 -04:00
Trevor Brown
2bc679084f Add test for the resolve_symlink function. 2018-10-07 21:47:57 -04:00
Trevor Brown
39687b5a94 Add test for not installing system versions. 2018-10-07 14:31:30 -04:00
Trevor Brown
af5393d563 Move current_command test into current_command.bats. 2018-10-07 14:22:31 -04:00
Jose Luis Salas
448d3215d8
Fix asdf current behaviour
Closes: #353
2018-10-04 21:00:29 +02:00
Trevor Brown
266e3cffa5
Merge pull request #360 from teixeiradiego/reshim-fix
Fix reshim to generate shims only for executable files and not directories.
2018-09-19 08:16:33 -04:00
Diego Nogueira Teixeira
20bb61963d Implemented tests for shim generation only for executable files, not directories. 2018-09-19 09:00:11 -03:00
Matt Wean
c468ae7d6a Add another test for the ASDF_DATA_DIR functionality. 2018-09-18 20:21:46 -04:00
Jose Luis Salas
d1782f456e
Retrieve asdf_data_dir from environment variable 2018-09-16 18:39:21 +02:00
Jose Luis Salas
c86707c55f
Add config option to install plugins in $HOME/.asdf 2018-08-11 15:37:56 +02:00
Trevor Brown
c7fb348ffd Add tests for symlink preservation. 2018-06-16 22:48:16 -04:00
Trevor Brown
4a4f453a93 Add readlink to list of banned commands. 2018-06-16 20:19:33 -04:00
Trevor Brown
c1ce9de4d4
Merge pull request #331 from brennanfee/fix-330-asdf-list
Fix for #330 - "asdf list" spacing
2018-06-16 15:30:35 -04:00
Trevor Brown
1b44fa7549 Fix shellcheck warnings. 2018-06-16 15:26:02 -04:00
Brennan Fee
ba1b181b58 Fixing unit tests for 'asdf list'
Now that we put spacing in front of the version #'s the tests need to
reflect that.
2018-06-01 10:15:40 -05:00
Melissa Xie
f79dda865a Include plugin name in error message if plugin doesn't exist
Previously, if we ran a command like `asdf install` and we encountered a
plugin that didn't exist, asdf produces an error saying "No such
plugin". Without knowing which plugin it could be referring too, we'd
have to manually go through each plugin in `.tool-versions` to find the
culprit.

With this commit, we'll now also include the plugin name as part of the
messaging for easier debugging.
2018-04-30 12:49:40 -04:00
hlhr
e1a4ff244f list command without parameter lists all packages with versions 2018-04-16 18:37:22 -04:00
Edoardo Tenani
e710959d1b adapt test to new error code 2018-04-09 20:35:51 +02:00
james.bunch
d62fa098c1 AZDF -> ASDF environment variable name spelling
change all instances of `AZDF` to read `ASDF` instead, to bring the
variable names in line with the project name
2018-02-27 11:56:04 -08:00
Trevor Brown
123c1404c1
Merge pull request #298 from aj-foster/fix-plugin-list-all-test
Fix `plugin-list-all` test
2018-02-26 09:17:37 -05:00
AJ Foster
210598239b Fix plugin-list-all test file name and update it for current output 2018-02-25 19:16:35 -05:00
AJ Foster
a195da28c2 Promote which version check from subshell to enable error emission 2018-02-25 18:34:39 -05:00
AJ Foster
eb5e5b780c Refactor "no version set" message to utilities 2018-02-25 18:33:42 -05:00
AJ Foster
c2fb6a3140 Escape backticks in command suggestion 2018-02-25 00:50:46 -05:00
AJ Foster
f15a0c9de3 Suggest action when no version is set 2018-02-25 00:40:26 -05:00
Trevor Brown
4efa8a9707 Fix failing test for ASDF_DEFAULT_TOOL_VERSIONS_FILENAME environment variable. 2018-02-12 18:41:27 -05:00
Trevor Brown
ed3a029e86
Merge branch 'master' into env-config-file-location 2018-02-11 17:31:17 -05:00
Trevor Brown
8abcceb8c0 Add test for tool name matching. 2018-02-11 17:28:29 -05:00
jthegedus
f99bdc75c0 add --urls flag for asdf list-plugins
Fixed tests due to use of printf
2018-01-14 19:38:00 +11:00
jthegedus
4d2870dcd5 update test accounting for URL output 2018-01-14 15:50:49 +11:00
Trevor Brown
8794210b8e Add 'eval' to list of banned commands. 2017-11-16 22:43:52 -05:00
Trevor Brown
e91e453580
Merge pull request #251 from asdf-vm/banned-commands
Add test that greps source code for banned commands.
2017-10-28 11:02:03 -04:00
Trevor Brown
7601afd9b9 Add test that greps source code for banned commands. 2017-10-28 10:54:10 -04:00
William Ashton
dc3865c9fd Prevent sed from creating -e backup files. Fixes #242 2017-10-26 15:58:45 -04:00
Victor Borja
db54c6bad1 test reshim with install from tool-versions 2017-10-25 14:19:03 -05:00
Victor Borja
97312e2f26 Test reshim a second time 2017-10-25 14:14:19 -05:00
Victor Borja
7a15a88493 Test shims are not duplicated 2017-10-25 14:05:59 -05:00