Output Files and Working Dir
Not sure I'm understanding the working dir and output files correctly.
My script is generating a file,
with open('test.txt', 'w') as f:
f.write('Create a new text file!')
And my runner config is like this,
"output_files": [
"~/*.txt"
]
What I understand is that if a working dir is not set the file will be generated in the /app directory (Docker). So setting a working dir makes sure the file is generated in the correct folder, in this case /app/temp/test so it gets deleted in my weekly clean up script.
However this is not working, pretty sure because I'm understanding this all wrong.
Hi @rgomez-eng, if a working directory is not set, the file should be generated in script folder (which is /app in docker), that's correct.
And the home folder ~ should reference to smth else (I believe this would be /).
So, I would suggest:
- please use absolute paths in your script, it should make it more transparent
- also use the same absolute path in
output_files
Thanks a lot. This worked right away.