-
Notifications
You must be signed in to change notification settings - Fork 7
Add nologin command
#125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add nologin command
#125
Conversation
|
Can you please run |
|
Done, sorry that was a basic error. |
src/uu/nologin/output.txt
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the purpose of this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was an intermediate file I didn't delete and accidentally committed (I think).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new "nologin" command to politely refuse a login, addressing issue #8.
- Introduces a new Cargo.toml and source files for the nologin command
- Implements the command logic using clap for argument parsing and uucore for utilities
- Updates the workspace Cargo.toml to include the new command in the feat_common_core list
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/uu/nologin/Cargo.toml | New package metadata for the nologin command |
| src/uu/nologin/src/nologin.rs | Command implementation using clap and uucore, including argument parsing |
| src/uu/nologin/nologin.md | Documentation for the nologin command |
| Cargo.toml | Workspace updated to include the nologin command |
| src/uu/nologin/src/main.rs | Entry point for the nologin command |
| set_exit_code(1); | ||
|
|
||
| let args: Vec<OsString> = args.collect(); | ||
| if args.len() > 2 { |
Copilot
AI
Mar 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The condition for extra arguments simply returns Ok() without any feedback to the user. Consider adding an error message or usage info instead of silently exiting.
| if args.len() > 2 { | |
| if args.len() > 2 { | |
| writeln!(std::io::stderr(), "Error: too many arguments")?; | |
| writeln!(std::io::stderr(), "Usage: {}", USAGE)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping ? :)
|
Inactive PR? |
Ref issue #8
Implements
nologincommand. Feedback welcome, this is my first PR to this org.