In the current implementation, the REPL commands such as .save and .load accept a filePath as arguments. It would greatly improve user experience if we could validate these arguments to prevent attempts to save or load files with empty filenames. In case the `file` is an empty string, we should print the error message, show the prompt to the user and `return`. `ERR_MISSING_ARGS` would be a good fit here to frame the message. Eg: ```const { message } = new ERR_MISSING_ARGS('file');``` String values like `0`, `false`, `null`, `undefined` etc are still a valid filenames and good to write some unit tests for this.
Activity
thomas-mauran commentedon Mar 26, 2024
Hello @MrJithil, I am interested in working on this issue. Could you guide me on where to start?
lib: .load .save add proper error message when no file passed
lib: .load .save add proper error message when no file passed
lib: .load .save add proper error message when no file passed
lib: .load .save add proper error message when no file passed