The `shell` action in v2.0.5 not working as before (v1.10.1)
See original GitHub issueHey, itโs me again. Sorry for being annoying, I hope you donโt mind my bug reports. ๐ฌ Iโm trying to post one issue at a time, the blockers firstโฆ ๐
Iโm running the latest version from GitHub (pipx install git+https://github.com/tfeldmann/organize.git
).
The shell
is not behaving the same way it did before.
This is my rule, converted from v1.10.1 and enhanced with the new syntax from v2.0.5:
rules:
- name: "Remove some hidden files and then remove empty dirs"
locations: ~/
filters:
- name:
startswith: .bash_history
actions:
- shell:
cmd: "fd -uu -0 -tf -i .DS_Store ~/Downloads ~/Desktop ~/OneDrive ~/Documents | xargs -0 rm -v"
ignore_errors: true
- echo: "{shell.output}"
- shell:
cmd: "fd -uu -0 -tf -i .nomedia ~/Downloads ~/Desktop ~/OneDrive ~/Documents | xargs -0 rm -v"
ignore_errors: true
- echo: "{shell.output}"
- shell:
cmd: "find -f ~/Downloads -f ~/Desktop -f ~/Documents ~/OneDrive -mindepth 1 -type d -empty -print -delete"
ignore_errors: true
- echo: "{shell.output}"
This is the output:
โฏ organize run
organize 2.0.5
Config: "/Users/aa/Library/Application Support/organize/config.yaml"
โ Remove some hidden files and then remove empty dirs โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
/Users/aa
.bash_history
- (shell) $ fd -uu -0 -tf -i .DS_Store ~/Downloads ~/Desktop ~/OneDrive ~/Documents | xargs -0 rm -v
- (echo) error: Found argument '-v' which wasn't expected, or isn't valid in this context
- (echo)
- (echo) USAGE:
- (echo) fd [FLAGS/OPTIONS] [<pattern>] [<path>...]
- (echo)
- (echo) For more information try --help
- (shell) $ fd -uu -0 -tf -i .nomedia ~/Downloads ~/Desktop ~/OneDrive ~/Documents | xargs -0 rm -v
- (echo) error: Found argument '-v' which wasn't expected, or isn't valid in this context
- (echo)
- (echo) USAGE:
- (echo) fd [FLAGS/OPTIONS] [<pattern>] [<path>...]
- (echo)
- (echo) For more information try --help
- (shell) $ find -f ~/Downloads -f ~/Desktop -f ~/Documents ~/OneDrive -mindepth 1 -type d -empty -print -delete
- (echo) find: ~/Downloads: No such file or directory
- (echo) find: ~/Desktop: No such file or directory
- (echo) find: ~/Documents: No such file or directory
- (echo) find: ~/OneDrive: No such file or directory
success 1 / fail 0
If I run the command manually, exactly as in the rule, it works:
โฏ fd -uu -0 -tf -i .DS_Store ~/Downloads ~/Desktop ~/OneDrive ~/Documents | xargs -0 rm -v
/Users/aa/Desktop/.DS_Store
/Users/aa/OneDrive/.DS_Store
Somehow shell expansion is not working, the ~/
path is not being expanded.
All these directories exist, despite the error in the output:
- (echo) find: ~/Downloads: No such file or directory
- (echo) find: ~/Desktop: No such file or directory
- (echo) find: ~/Documents: No such file or directory
- (echo) find: ~/OneDrive: No such file or directory
Issue Analytics
- State:
- Created 2 years ago
- Comments:21 (11 by maintainers)
Top Results From Across the Web
Error: Electron failed to install correctly, please delete ... - GitHub
I can not use Electron because it is not installed correctly, despite using the shell in administrator mode. Note that when installingย ...
Read more >Fix list for IBM WebSphere Application Server V8.5
IBM WebSphere Application Server provides periodic fixes for the base and Network Deployment editions of release V8.5. The following is a complete listingย ......
Read more >Max retries exceeded with URL in requests - Stack Overflow
Just use requests features: import requests from requests.adapters import HTTPAdapter from urllib3.util.retry import Retry session = requests.
Read more >Avaya Auraยฎ 10.1.x.x Release Notes
Avaya does not guarantee that these links will work all the time and has no control over the availability of the linked pages....
Read more >Changelog | Meteor API Docs
needs to use directly from npm the meteorjs/babel@7.16.1-beta.0. Breaking Changes. N/A. Migration Steps. Meteor Version Release. mongo@1.16.2 :.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Please wait a moment, Iโm getting this sorted out.
Quoto, in the previous version it was possible to see the shell output in real time and this allowed me to be able to act if my intervention was required. For example, among my commands I have
brew upgrade
, which allows you to update installed packages and it is possible that my intervention may be required, to confirm an action or to enter the root password. If this happens, nowโ ด organizing
remains in the loop because it is not possible to intervene in the shell.