You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Notebook and Quarto deploys with -r uv.lock fail for a bare filename (cwd is empty) #922
From a uv project directory that contains uv.lock:
rsconnect write-manifest notebook -r uv.lock nb.ipynb # fails
rsconnect write-manifest quarto -r uv.lock doc.qmd # fails
rsconnect write-manifest quarto -r uv.lock ./doc.qmd # works
deploy notebook and deploy quarto fail the same way.
Cause
base_dir = dirname(file) is "" for a bare filename (main.py#L2195, main.py#L3084). uv_export then builds lock_path = os.path.join("", "uv.lock") == "uv.lock" and runs subprocess.run(..., cwd=os.path.dirname(lock_path)), which means cwd="" (inspect_environment.py#L237-L262). subprocess can't chdir("").
Requirements files in requirements.txt format don't hit this because they don't spawn a subprocess with that cwd.
Expected
A bare filename works the same as ./filename. Possible fixes: resolve lock_path with os.path.abspath in uv_export, and/or normalize base_dir to "."/an absolute path when dirname() returns "".
Activity