Skip to content

feat: Add --no-spawn-shell flag to disable shell access#440

Merged
dundee merged 3 commits into
dundee:masterfrom
ShivamB25:master
Oct 16, 2025
Merged

feat: Add --no-spawn-shell flag to disable shell access#440
dundee merged 3 commits into
dundee:masterfrom
ShivamB25:master

Conversation

@ShivamB25

Copy link
Copy Markdown
Contributor

This PR introduces a new flag, --no-spawn-shell, which disables the ability to spawn a shell or open items in external programs. This is useful for environments where shell access should be restricted. Fixes #429

This commit introduces a new flag, --no-spawn-shell, which disables the
ability to spawn a shell or open items in external programs. This is
useful for environments where shell access should be restricted.

This resolves issue dundee#429.
@ShivamB25

Copy link
Copy Markdown
Contributor Author

please test @dundee @tomzx

@codecov

codecov Bot commented Oct 13, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.50000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.45%. Comparing base (f2f31ea) to head (adc2e6d).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
tui/keys.go 69.23% 6 Missing and 2 partials ⚠️
cmd/gdu/main.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #440      +/-   ##
==========================================
- Coverage   83.49%   83.45%   -0.05%     
==========================================
  Files          46       46              
  Lines        4412     4449      +37     
==========================================
+ Hits         3684     3713      +29     
- Misses        656      662       +6     
- Partials       72       74       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ShivamB25

Copy link
Copy Markdown
Contributor Author

The test failure was due to a "data race" in a test called TestRemoveStoredFile. please check.

@ShivamB25

ShivamB25 commented Oct 13, 2025

Copy link
Copy Markdown
Contributor Author

Moving a.wait.Done() after the progress channel update prevents race conditions between ResetProgress and processDir accessing shared data. This placement is unconventional and warrants a thorough review.

@ShivamB25

Copy link
Copy Markdown
Contributor Author

@dundee please check

@dundee dundee merged commit a222089 into dundee:master Oct 16, 2025
10 checks passed
@dundee

dundee commented Oct 16, 2025

Copy link
Copy Markdown
Owner

Thank you!

zoza1982 pushed a commit to zoza1982/gdu that referenced this pull request Oct 23, 2025
* feat: Add --no-spawn-shell flag to disable shell access

This commit introduces a new flag, --no-spawn-shell, which disables the
ability to spawn a shell or open items in external programs. This is
useful for environments where shell access should be restricted.

This resolves issue dundee#429.

* test: Increase coverage for --no-spawn-shell flag

* fix: data race in TestRemoveStoredFile
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request Dec 29, 2025
https://build.opensuse.org/request/show/1324629
by user jfkw + anag_factory
- Version 5.32.0
  * feat: Add --no-spawn-shell flag to disable shell access (gh#dundee/gdu#440)
  * feat: Add support showing size of absent git-annex'ed files (gh#dundee/gdu#404)
  * fix: ctrl_z corruption (gh#dundee/gdu#253) by (gh#dundee/gdu#406)
  * fix: item count for --show-item-count (gh#dundee/gdu#416)
  * fix: automatically run non-interactive when related flag set (gh#dundee/gdu #418) (forwarded request 1324602 from RN)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disable spawn shell through a --no-spawn-shell flag

2 participants