synthead/timex-datalink-assembler

Calling asm6805 against an assembly file that doesn't exist displays errors in the console

synthead opened this issue · 0 comments

When calling asm6805 with a file path that doesn't exist, these errors are displayed in the console:

$ asm6805 that
grep: that: No such file or directory
asm6805: line 57: that: No such file or directory

These errors are from these lines:

elif grep -q '^;Sound:' "$1"; then

# Assemble the program with Toebes' assembler with a wrapper script.
docker run --rm --interactive "$IMAGE_VERSIONED_TAG" /root/VAsm6805-wrapper < "$1" > "$output_file"

Add a check to ensure that an input file exists, and exit early if it doesn't.