Skip to content
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

do not change directory for parse command #1224

Open
gyorb opened this issue Dec 6, 2017 · 2 comments
Open

do not change directory for parse command #1224

gyorb opened this issue Dec 6, 2017 · 2 comments
Labels
CLI 💻 Related to the command-line interface, such as the cmd, store, etc. commands discussion 💡 question ❔

Comments

@gyorb
Copy link
Contributor

gyorb commented Dec 6, 2017

the parse command changes directory to working_directory from metadata.json before parsing the plist files
why is this needed?

If a compressed report directory is sent to another user the parse will not work.

@whisperity whisperity added the CLI 💻 Related to the command-line interface, such as the cmd, store, etc. commands label Dec 7, 2017
@csordasmarton
Copy link
Contributor

It was implemented in #639 and it works the same now:

try:
os.chdir(working_dir)
except OSError as oerr:
LOG.debug(oerr)
LOG.error("Working directory %s is missing.\n"
"Can not parse reports safely.", working_dir)
sys.exit(1)

I do not now what was the reason behind this but I removed it in #2616.

@csordasmarton csordasmarton added this to the release 6.12.0 milestone Mar 13, 2020
@gyorb
Copy link
Contributor Author

gyorb commented Mar 13, 2020

Could that be the original reason if there is some relative file path in the report it can not be parsed?
Usually the file path in the reports are relative if the include paths or the file path is relative in the compile command database. If there are only absolute paths everything should be absolute in the generated reports.

@gyorb gyorb modified the milestones: release 6.12.0, release 6.13.0 Apr 23, 2020
@gyorb gyorb modified the milestones: release 6.13.0, release 6.14.0 Jul 7, 2020
@gyorb gyorb modified the milestones: release 6.14.0, release 6.15.0 Sep 8, 2020
@gyorb gyorb modified the milestones: release 6.15.0, release 6.16.0 Nov 11, 2020
@csordasmarton csordasmarton modified the milestones: release 6.16.0, release 6.16.1 Jun 2, 2021
@csordasmarton csordasmarton modified the milestones: release 6.16.1, release 6.17.1 Sep 7, 2021
@csordasmarton csordasmarton modified the milestones: release 6.17.1, release 6.18.0 Nov 4, 2021
@csordasmarton csordasmarton removed this from the release 6.18.0 milestone Nov 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI 💻 Related to the command-line interface, such as the cmd, store, etc. commands discussion 💡 question ❔
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants