Skip to content
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

rm: chmod not needed #914

Merged
merged 2 commits into from
Jan 8, 2025
Merged

rm: chmod not needed #914

merged 2 commits into from
Jan 8, 2025

Conversation

mknos
Copy link
Contributor

@mknos mknos commented Jan 8, 2025

  • Previously chmod() was being passed a string as the first argument, which didn't look right
  • I studied the OpenBSD version and it doesn't do any chmod() so remove it here too
  • For non-interactive mode (neither -i nor -f), print a special prompt if a file is non-writable
  • For interactive mode, print a normal prompt for every file
  • For force mode, do not check if a file is writable or print a prompt
  • To test this I created a new file and set the permissions to 0 with chmod before "rm x", "rm -i x" and "rm -f x"

mknos added 2 commits January 8, 2025 09:18
* Previously chmod() was being passed a string, which didn't look correct
* I studied the OpenBSD version and it doesn't perform any chmod() so remove it here too
* For non-interactive mode (neither -i nor -f), print a special prompt if a file is not writable
* For interactive mode, print a normal prompt for every file
* For force mode do not check if a file is writable or print a prompt
* To test this I created a new file and set the permissions to 0 with chmod before "rm x", "rm -i x" and "rm -f x"
@github-actions github-actions bot added Type: enhancement improve a feature that already exists Priority: low get to this whenever Program: rm The rm program labels Jan 8, 2025
@mknos mknos temporarily deployed to automated_testing January 8, 2025 01:25 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 8, 2025 01:25 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 8, 2025 01:25 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 8, 2025 01:25 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 8, 2025 01:25 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 8, 2025 01:25 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 8, 2025 01:25 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 8, 2025 01:25 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 8, 2025 01:25 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 8, 2025 01:25 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 8, 2025 01:25 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 8, 2025 01:25 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 8, 2025 01:25 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 8, 2025 01:25 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 8, 2025 01:25 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 8, 2025 01:25 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 8, 2025 01:25 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 8, 2025 01:25 — with GitHub Actions Inactive
@mknos mknos temporarily deployed to automated_testing January 8, 2025 01:25 — with GitHub Actions Inactive
@mknos mknos changed the title Rm chmod rm: chmod not needed Jan 8, 2025
@mknos mknos temporarily deployed to automated_testing January 8, 2025 01:26 — with GitHub Actions Inactive
@coveralls
Copy link

coveralls commented Jan 8, 2025

Pull Request Test Coverage Report for Build 12662303412

Details

  • 2 of 3 (66.67%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+1.0%) to 73.389%

Changes Missing Coverage Covered Lines Changed/Added Lines %
bin/rm 2 3 66.67%
Files with Coverage Reduction New Missed Lines %
bin/rm 1 88.18%
Totals Coverage Status
Change from base Build 12647728061: 1.0%
Covered Lines: 353
Relevant Lines: 481

💛 - Coveralls

@briandfoy briandfoy self-assigned this Jan 8, 2025
@briandfoy briandfoy merged commit 320d267 into briandfoy:master Jan 8, 2025
22 of 23 checks passed
@briandfoy briandfoy added Status: accepted The fix is accepted and removed Priority: low get to this whenever labels Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Program: rm The rm program Status: accepted The fix is accepted Type: enhancement improve a feature that already exists
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants