app: improve error when there's no manifest file

For missing files, the new output looks like this:

FATAL ERROR: manifest file not found: /home/mbolivar/zp/zephyr/nosuchfile
Please check manifest.file and manifest.path in /home/mbolivar/zp/.west/config

The old output looks like this:

FATAL ERROR: file not found: /home/mbolivar/zp/zephyr/nosuchfile

The new output is clearly more helpful.

Make a similar improvement for permission errors.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit is contained in:
Martí Bolívar 2023-02-27 11:28:52 -08:00 committed by Marti Bolivar
parent ac7a03cc15
commit a76e6641b7
1 changed files with 5 additions and 2 deletions

View File

@ -225,11 +225,14 @@ class WestApp:
# level manifest is not found. # level manifest is not found.
self.queued_io.append( self.queued_io.append(
lambda cmd: lambda cmd:
cmd.die(f"file not found: {self.mle.filename}")) cmd.die(f"manifest file not found: {self.mle.filename}\n"
"Please check manifest.file and manifest.path in "
f"{self.topdir + '/' or ''}.west/config"))
elif isinst(PermissionError): elif isinst(PermissionError):
self.queued_io.append( self.queued_io.append(
lambda cmd: lambda cmd:
cmd.die(f"permission denied: {self.mle.filename}")) cmd.die("permission denied when loading manifest file: "
f"{self.mle.filename}"))
else: else:
self.queued_io.append( self.queued_io.append(
lambda cmd: lambda cmd: