Skip to content

Expand ~ in CIRRUS_VERSIONS_PATH#38

Merged
pinkwah merged 1 commit intomainfrom
expand
Apr 9, 2025
Merged

Expand ~ in CIRRUS_VERSIONS_PATH#38
pinkwah merged 1 commit intomainfrom
expand

Conversation

@pinkwah
Copy link
Copy Markdown
Collaborator

@pinkwah pinkwah commented Apr 9, 2025

Path's expanduser() function does exactly this. Otherwise ~ is treated as its own filename.

Tested by:

>>> from pathlib import Path
>>> Path("~/cirrus").resolve()
PosixPath('/var/home/zohar/Develop/Equinor/CCS/cirrus-deploy/~/cirrus')
>>> Path("~/cirrus").expanduser()
PosixPath('/var/home/zohar/cirrus')

Resolves: #20

Path's expanduser() function does exactly this. Otherwise `~` is treated
as its own filename.

Tested by:
```py
>>> from pathlib import Path
>>> Path("~/cirrus").resolve()
PosixPath('/var/home/zohar/Develop/Equinor/CCS/cirrus-deploy/~/cirrus')
>>> Path("~/cirrus").expanduser()
PosixPath('/var/home/zohar/cirrus')
```
@pinkwah pinkwah merged commit 6c27135 into main Apr 9, 2025
1 check passed
@pinkwah pinkwah deleted the expand branch April 9, 2025 14:55
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.

Expand ~ in CIRRUS_VERSIONS_PATH

1 participant