Skip to content

Commit 28f6a0d

Browse files
committed
Add warning when prompt does not contain cwd and base
1 parent 96b234c commit 28f6a0d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

dissect/target/tools/shell.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,8 @@ def __init__(self, target: Target):
407407
if ps1 := getattr(target._config, "PS1", None):
408408
if "{cwd}" in ps1 and "{base}" in ps1:
409409
self.prompt_ps1 = ps1
410+
else:
411+
self.target.log.warning("Error {cwd} and {base} was not set inside PS1, using the default prompt.")
410412

411413
elif getattr(target._config, "NO_COLOR", None) or os.getenv("NO_COLOR"):
412414
self.prompt_ps1 = "{base}:{cwd}$ "

0 commit comments

Comments
 (0)