oras-py icon indicating copy to clipboard operation
oras-py copied to clipboard

Push fails on Windows if filepath has drive in it

Open sunnycarter opened this issue 1 year ago • 1 comments

blob is C:\Users\blah\test.json The command failed with an unexpected error. Here is the traceback: C does not exist. Traceback (most recent call last): File "C:\Users\sunnycarter.azure\cliextensions\aosm\oras\client.py", line 131, in push return self.remote.push(*args, **kwargs) File "C:\Users\sunnycarter.azure\cliextensions\aosm\oras\provider.py", line 647, in push raise FileNotFoundError(f"{blob} does not exist.")

I believe this is because various places in the oras code split on ':' expecting this to be between the filepath and the media data. However, ':' is in the path on window too. I'll submit a PR to fix.

sunnycarter avatar Jul 06 '23 11:07 sunnycarter

Fix in https://github.com/oras-project/oras-py/pull/94/files

sunnycarter avatar Jul 06 '23 16:07 sunnycarter