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

Tilde expansion not supported #3

Closed
anothermh opened this issue Jan 22, 2023 · 1 comment · Fixed by #7
Closed

Tilde expansion not supported #3

anothermh opened this issue Jan 22, 2023 · 1 comment · Fixed by #7

Comments

@anothermh
Copy link

Tilde expansion is not supported. For example, consider the following command:

git-sim --media-dir=~/temp log

The expectation is that media-dir will map to $HOME/temp, for example /Users/foo/temp. Instead it maps to the current directory and creates a sub-directory with the literal name ~, e.g. ./~/temp:

└── ~
    └── temp
        └── git-sim_media
            ├── images
            ├── texts
            └── videos
                └── 1080p60
                    └── partial_movie_files
                        └── GitSim

This was tested on macOS using both ZSH and fish for the shell, using python 3.11.1.

The problem appears to be here:

config.media_dir = os.path.join(args.media_dir, "git-sim_media")

Using os.path.expanduser will allow tilde expansion.

@initialcommit-io
Copy link
Contributor

Lol whoops, good catch. Thanks for finding the exact location in the codebase and suggesting a solution! Any chance you want to submit a pull request for it? :D

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 a pull request may close this issue.

2 participants