Skip to content

Commit ed2296c

Browse files
committed
force absolute paths on install of completion scripts #156
1 parent bdb6be5 commit ed2296c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

django_typer/management/commands/shellcompletion.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -355,12 +355,14 @@ def manage_script(self) -> t.Union[str, Path]:
355355
# this case as well, but it does complicate the installation for some shell's so we must
356356
# first figure out which mode we are in.
357357
if not self._manage_script:
358-
self._manage_script = get_usage_script()
359-
return self._manage_script
358+
self.manage_script = None # type: ignore
359+
return self._manage_script # type: ignore
360360

361361
@manage_script.setter
362362
def manage_script(self, script: t.Optional[str]):
363363
self._manage_script = get_usage_script(script)
364+
if isinstance(self._manage_script, Path):
365+
self._manage_script = self._manage_script.absolute()
364366

365367
@property
366368
def manage_script_name(self) -> str:

0 commit comments

Comments
 (0)