-
-
Notifications
You must be signed in to change notification settings - Fork 33.3k
Closed
Labels
good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.
Description
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.
Metadata
Metadata
Assignees
Labels
good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.