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

Logging - Choco --log-file option should create log files relative to current directory #1603

Closed
pauby opened this issue Jun 26, 2018 · 2 comments

Comments

@pauby
Copy link
Member

pauby commented Jun 26, 2018

This was checked using FOSS and all licensed versions of v0.10.11 with the same results.

What You Are Seeing?

When using the --log-file parameter I see the following:

  • If you specify a relative filename (ie. --log-file=test.log) the file is created under the Chocolatey ProgramData folder rather than in the current folder;
  • If you specify a relative path (ie. --log-file=temp\test.log) an empty folder temp is created under the current folder and the full path (temp\test.log) is created under the Chocolatey ProgramData folder;
  • If you specify a full path (ie. --log-file=c:\temp\test.log) the log file is created correctly at c:\temp\test.log;

What is Expected?

I'd expect relative paths to be create under the current folder and not under Chocolatey ProgramData.

How Did You Get This To Happen? (Steps to Reproduce)

choco new test <LOG FILE PARAMS FROM ABOVE>

@ferventcoder
Copy link
Member

Added to the backlog!

@ferventcoder ferventcoder changed the title Choco --log-file parameter does not create log files relative to current directory Logging - Choco --log-file parameter does not create log files relative to current directory Sep 26, 2018
gep13 added a commit to gep13/choco that referenced this issue Mar 13, 2019
Use helper method in IFileSystem implementation to ensure that the full
path to the requested log file is used, rather than making it relative
to where Chocolatey is currently located.
gep13 added a commit to gep13/choco that referenced this issue Mar 13, 2019
Use helper method in IFileSystem implementation to ensure that the full
path to the requested log file is used, rather than making it relative
to where Chocolatey is currently located.
ferventcoder pushed a commit that referenced this issue Mar 13, 2019
Use helper method in IFileSystem implementation to ensure that the full
path to the requested log file is used, rather than making it relative
to where Chocolatey is currently located.
ferventcoder added a commit that referenced this issue Mar 13, 2019
* pr1752:
  (GH-1603) Ensure full path for log when relative path provided
ferventcoder added a commit that referenced this issue Mar 13, 2019
* stable:
  (GH-1603) Ensure full path for log when relative path provided
@ferventcoder
Copy link
Member

This will be released with 0.10.12.

@ferventcoder ferventcoder changed the title Logging - Choco --log-file parameter does not create log files relative to current directory Logging - Choco --log-file option should create log files relative to current directory Mar 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants