Skip to content

Commit

Permalink
Merge branch 'main' into multi-env
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx authored Dec 5, 2024
2 parents 1f710d6 + 3222e48 commit a8154ae
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ You can also specify the full name for a tool using `mise use aqua:1password/cli
| atmos | [aqua:cloudposse/atmos](https://github.com/cloudposse/atmos) [asdf:cloudposse/asdf-atmos](https://github.com/cloudposse/asdf-atmos) |
| auto-doc | [asdf:looztra/asdf-auto-doc](https://github.com/looztra/asdf-auto-doc) |
| aws-amplify | [ubi:aws-amplify/amplify-cli](https://github.com/aws-amplify/amplify-cli) [asdf:LozanoMatheus/asdf-aws-amplify-cli](https://github.com/LozanoMatheus/asdf-aws-amplify-cli) |
| aws-cli | [aqua:aws/aws-cli](https://github.com/aws/aws-cli) [asdf:MetricMike/asdf-awscli](https://github.com/MetricMike/asdf-awscli) |
| aws-copilot | [aqua:aws/copilot-cli](https://github.com/aws/copilot-cli) [asdf:NeoHsu/asdf-copilot](https://github.com/NeoHsu/asdf-copilot) |
| aws-iam-authenticator | [aqua:kubernetes-sigs/aws-iam-authenticator](https://github.com/kubernetes-sigs/aws-iam-authenticator) [asdf:zekker6/asdf-aws-iam-authenticator](https://github.com/zekker6/asdf-aws-iam-authenticator) |
| aws-nuke | [aqua:rebuy-de/aws-nuke](https://github.com/rebuy-de/aws-nuke) [asdf:bersalazar/asdf-aws-nuke](https://github.com/bersalazar/asdf-aws-nuke) |
| aws-sam | [pipx:aws-sam-cli](https://pypi.org/project/aws-sam-cli) [asdf:amrox/asdf-pyapp](https://github.com/amrox/asdf-pyapp) |
| aws-sso | [aqua:synfinatic/aws-sso-cli](https://github.com/synfinatic/aws-sso-cli) [asdf:adamcrews/asdf-aws-sso-cli](https://github.com/adamcrews/asdf-aws-sso-cli) |
| aws-vault | [aqua:99designs/aws-vault](https://github.com/99designs/aws-vault) [asdf:karancode/asdf-aws-vault](https://github.com/karancode/asdf-aws-vault) |
| awscli | [asdf:MetricMike/asdf-awscli](https://github.com/MetricMike/asdf-awscli) |
| awscli-local | [asdf:paulo-ferraz-oliveira/asdf-awscli-local](https://github.com/paulo-ferraz-oliveira/asdf-awscli-local) |
| awsebcli | [pipx:awsebcli](https://pypi.org/project/awsebcli) [asdf:amrox/asdf-pyapp](https://github.com/amrox/asdf-pyapp) |
| awsls | [ubi:jckuester/awsls](https://github.com/jckuester/awsls) [asdf:chessmango/asdf-awsls](https://github.com/chessmango/asdf-awsls) |
Expand Down
5 changes: 4 additions & 1 deletion registry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ atmos.backends = ["aqua:cloudposse/atmos", "asdf:cloudposse/asdf-atmos"]
auto-doc.backends = ["asdf:looztra/asdf-auto-doc"]
aws-amplify.aliases = ["amplify"]
aws-amplify.backends = ["ubi:aws-amplify/amplify-cli[exe=amplify]", "asdf:LozanoMatheus/asdf-aws-amplify-cli"]
aws-cli.aliases = ["aws", "awscli"]
aws-cli.backends = ["aqua:aws/aws-cli", "asdf:MetricMike/asdf-awscli"]
aws-cli.test = ["aws --version", "aws-cli/{{version}}"]
aws-cli.os = ["linux", "macos"]
aws-copilot.backends = ["aqua:aws/copilot-cli", "asdf:NeoHsu/asdf-copilot"]
aws-iam-authenticator.backends = ["aqua:kubernetes-sigs/aws-iam-authenticator", "asdf:zekker6/asdf-aws-iam-authenticator"]
aws-nuke.backends = ["aqua:rebuy-de/aws-nuke", "asdf:bersalazar/asdf-aws-nuke"]
Expand All @@ -69,7 +73,6 @@ aws-sam.backends = ["pipx:aws-sam-cli", "asdf:amrox/asdf-pyapp"]
# aws-sam.test = ["sam --version", "SAM CLI, version {{version}}"] # takes forever on windows in CI
aws-sso.backends = ["aqua:synfinatic/aws-sso-cli", "asdf:adamcrews/asdf-aws-sso-cli"]
aws-vault.backends = ["aqua:99designs/aws-vault", "asdf:karancode/asdf-aws-vault"]
awscli.backends = ["asdf:MetricMike/asdf-awscli"]
awscli-local.backends = ["asdf:paulo-ferraz-oliveira/asdf-awscli-local"]
awsebcli.backends = ["pipx:awsebcli", "asdf:amrox/asdf-pyapp"]
awsebcli.test = ["eb --version", "EB CLI {{version}}"]
Expand Down
2 changes: 2 additions & 0 deletions src/backend/aqua.rs
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,8 @@ impl AquaBackend {
file::make_executable(&bin_path)?;
} else if format == "dmg" {
file::un_dmg(&tarball_path, &install_path)?;
} else if format == "pkg" {
file::un_pkg(&tarball_path, &install_path)?;
} else {
bail!("unsupported format: {}", format);
}
Expand Down
10 changes: 10 additions & 0 deletions src/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,16 @@ pub fn un_dmg(archive: &Path, dest: &Path) -> Result<()> {
Ok(())
}

pub fn un_pkg(archive: &Path, dest: &Path) -> Result<()> {
debug!(
"pkgutil --expand-full {} {}",
archive.display(),
dest.display()
);
cmd!("pkgutil", "--expand-full", archive, dest).run()?;
Ok(())
}

#[cfg(windows)]
pub fn un7z(archive: &Path, dest: &Path) -> Result<()> {
sevenz_rust::decompress_file(archive, dest)
Expand Down

0 comments on commit a8154ae

Please sign in to comment.