- 
                Notifications
    You must be signed in to change notification settings 
- Fork 45
Pass taskrc via environment variable to subprocess. #134
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
Pass taskrc via environment variable to subprocess. #134
Conversation
I can't find where the rc:{config_filename} option is documented and it
doesn't seem to work on taskwarrior 2.5.1.
    cadde18    to
    5931171      
    Compare
  
    | Maybe not important, but I’m fairly sure  | 
Similarly to ralphbean#134, passing description via description:{description} doesn't appear to be documented and can lead to problems. See GothenburgBitFactory/bugwarrior#733 and consider the following scenario: $ task --version 2.5.1 $ task add description:"depends filter does not work with ID" The expression could not be evaluated. $ task add "depends filter does not work with ID" Created task 1. I've tried variations of the previous with various quoting and shells and have gotten the same result.
Similarly to ralphbean#134, passing description via description:{description} doesn't appear to be documented and can lead to problems. See GothenburgBitFactory/bugwarrior#733 and consider the following scenario: ```sh $ task --version 2.5.1 $ task add description:"depends filter does not work with ID" The expression could not be evaluated. $ task add "depends filter does not work with ID" Created task 1. ``` I've tried variations of the previous with various quoting and shells and have gotten the same result.
| I can confirm that  | 
| Thanks for the feedback. My reasoning was wrong but now that I understand it better I still think the patch is defensible. I've updated the PR description accordingly. | 
Similarly to ralphbean#134, passing description via description:{description} doesn't appear to be documented and can lead to problems. See GothenburgBitFactory/bugwarrior#733 and consider the following scenario: ```sh $ task --version 2.5.1 $ task add description:"depends filter does not work with ID" The expression could not be evaluated. $ task add "depends filter does not work with ID" Created task 1. ``` I've tried variations of the previous with various quoting and shells and have gotten the same result.
Similarly to ralphbean#134, passing description via description:{description} doesn't appear to be documented and can lead to problems. See GothenburgBitFactory/bugwarrior#733 and consider the following scenario: ```sh $ task --version 2.5.1 $ task add description:"depends filter does not work with ID" The expression could not be evaluated. $ task add "depends filter does not work with ID" Created task 1. ``` I've tried variations of the previous with various quoting and shells and have gotten the same result.
Based on #131.
I can't find where the rc:{config_filename} option is documented and itdoesn't seem to work on taskwarrior 2.5.1.
The environment variable
TASKRCoverrides anrc:%sargument, which means if there is aTASKRCenvironment variable, it will override the value passed toconfig_filename. This is only a problem inTaskWarriorShelloutbecause subprocess inherits the environment.Alternatively, we could set
env={}in the subprocess call to isolate the environment, but this would be a more aggressive change and might not be desirable.I encountered this as a problem running the tests in an environment with the
TASKRCvariable defined, which causes the global taskrc (and therefore taskwarrior database) to be used by the test suite instead of the test configuration and database, which added a bunch of fake test data to my personal database. If this were the only issue we could do better environment isolation in the test suite. However, ignoringconfig_filenameisn't desirable for taskw library users either.