organize icon indicating copy to clipboard operation
organize copied to clipboard

Shell command fails

Open florianklumb opened this issue 8 months ago • 0 comments

Describe the bug Steps to reproduce (I think):

Add the following rule:

- name: POC 
    locations: ~/Downloads/
    filters:
        - extension: pdf
    actions:
        - shell:
            cmd: "python -c 'import datetime; print(datetime.date.today())'"
            run_in_simulation: true
            #ignore_errors : true
        - echo: '{shell.output}'

When running without ignore_errors : true, I get this error:

⚙ Rule #1: POC ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
C:\Users\.../Downloads
  ./xyz.pdf
    - (shell) $ python -c 'import datetime; print(datetime.date.today())'
    - (shell) ERROR! Command 'python -c 'import datetime; print(datetime.date.today())'' returned non-zero exit status 1.

When running with ignore_errors : true, I get:

⚙ Rule #1: POC ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
C:\Users\.../Downloads
  ./xyz.pdf
    - (shell) $ python -c 'import datetime; print(datetime.date.today())'
    - (shell) ERROR! cannot access local variable 'call' where it is not associated with a value

Environment (please complete the following information):

  • OS: Windows 10
  • Output of organize --version: organize v3.2.3

florianklumb avatar Jun 16 '24 22:06 florianklumb