Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix distrobox-export --bin error handling #275

Merged
merged 1 commit into from
May 16, 2022

Conversation

michel-slm
Copy link
Contributor

The check that --export-path is also passed fails because the
dest_path variable used to store the argument does not have a
default value.

Fixes #274

distrobox on  fix-export-bin [!]
⬢ [fedora-toolbox:36] ❯ distrobox-export --bin /usr/bin/fedpkg
/usr/bin/distrobox-export: line 205: dest_path: unbound variable

An error occurred
distrobox on  fix-export-bin [!]
⬢ [fedora-toolbox:36] ❯ distrobox-export --bin /usr/bin/fedpkg
Error: Missing argument export-path.

An error occurred

distrobox on  fix-export-bin [!]
⬢ [fedora-toolbox:36] ❯ distrobox-export --bin /usr/bin/fedpkg --export-path ~/bin
/usr/bin/fedpkg from f36-packaging exported successfully in /home/michel/bin.
OK!

Signed-off-by: Michel Alexandre Salim michel@michel-slm.name

The check that `--export-path` is also passed fails because the
`dest_path` variable used to store the argument does not have a
default value.

Fixes 89luca89#274

```shell
distrobox on  fix-export-bin [!]
⬢ [fedora-toolbox:36] ❯ distrobox-export --bin /usr/bin/fedpkg
/usr/bin/distrobox-export: line 205: dest_path: unbound variable

An error occurred
```

```shell
distrobox on  fix-export-bin [!]
⬢ [fedora-toolbox:36] ❯ distrobox-export --bin /usr/bin/fedpkg
Error: Missing argument export-path.

An error occurred

distrobox on  fix-export-bin [!]
⬢ [fedora-toolbox:36] ❯ distrobox-export --bin /usr/bin/fedpkg --export-path ~/bin
/usr/bin/fedpkg from f36-packaging exported successfully in /home/michel/bin.
OK!

```

Signed-off-by: Michel Alexandre Salim <michel@michel-slm.name>
@89luca89
Copy link
Owner

Thanks a lot @michel-slm !

@89luca89 89luca89 merged commit c6e2435 into 89luca89:main May 16, 2022
@michel-slm michel-slm deleted the fix-export-bin branch May 16, 2022 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Error] distrobox-export --bin fails with unbound variable error if --export-path is not specified
2 participants