File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -84,3 +84,17 @@ assert_contains "bin/gh --version" "gh version"
8484assert_contains " bin/gh --version" " gh version" # short-circuit works
8585mise uninstall --all
8686assert_contains " bin/gh --version" " gh version" # refetches even if it's cached
87+
88+ # Test 12: Aqua backend
89+ cat > bin/flyctl << 'EOF '
90+ #!/usr/bin/env -S mise tool-stub
91+ tool = "flyctl"
92+ version = "0.3.206"
93+ bin = "flyctl"
94+ EOF
95+
96+ chmod +x bin/flyctl
97+
98+ assert_contains " bin/flyctl version" " flyctl v0.3.206"
99+ mise uninstall --all
100+ assert_contains " bin/flyctl version" " flyctl v0.3.206"
Original file line number Diff line number Diff line change @@ -247,7 +247,7 @@ impl Backend for AquaBackend {
247247
248248impl AquaBackend {
249249 pub fn from_arg ( ba : BackendArg ) -> Self {
250- let full = ba. full ( ) ;
250+ let full = ba. full_without_opts ( ) ;
251251 let mut id = full. split_once ( ":" ) . unwrap_or ( ( "" , & full) ) . 1 ;
252252 if !id. contains ( "/" ) {
253253 id = REGISTRY
Original file line number Diff line number Diff line change @@ -273,6 +273,14 @@ impl BackendArg {
273273 full
274274 }
275275
276+ pub fn full_without_opts ( & self ) -> String {
277+ let full = self . full ( ) ;
278+ if let Some ( c) = regex ! ( r"^(.+)\[(.+)\]$" ) . captures ( & full) {
279+ return c. get ( 1 ) . unwrap ( ) . as_str ( ) . to_string ( ) ;
280+ }
281+ full
282+ }
283+
276284 pub fn opts ( & self ) -> ToolVersionOptions {
277285 self . opts . clone ( ) . unwrap_or_else ( || {
278286 if let Some ( c) = regex ! ( r"^(.+)\[(.+)\]$" ) . captures ( & self . full ( ) ) {
You can’t perform that action at this time.
0 commit comments