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

Bug found in: document generator(?) #10

Open
SDanDyS opened this issue Jul 16, 2021 · 6 comments
Open

Bug found in: document generator(?) #10

SDanDyS opened this issue Jul 16, 2021 · 6 comments

Comments

@SDanDyS
Copy link

SDanDyS commented Jul 16, 2021

Describe the bug
Whenever I try to use the command-line to generate docs for my project it throws the following error: [ERROR] Could not create export path
I run it like this: php vendor/bin/roster C:\xampp\htdocs\framework\classes

To Reproduce
Steps to reproduce the behavior:

  1. Open git-bash (Windows) in your root directory. In my case I want to generate documentation for the project framework, so I open git-bash in framework.
  2. I run it like this: php vendor/bin/roster C:\xampp\htdocs\framework\classes (classes is basically the src folder most people use for their classes etc.)
  3. results in: [ERROR] Could not create export path

Expected behavior
It will throw the following error: [ERROR] Could not create export path

PHP Version
8.0

Additional context
I do have permission within the directory.
I open my git-bash in the framework directory (which would be the root).

@JordanRL
Copy link
Owner

How would you want this to be handled when you don't have permissions on the directory? Would you like to specify and export path?

@SDanDyS
Copy link
Author

SDanDyS commented Jul 17, 2021

I think this would solve a lot of ear scratching yes.

I think being able to specify an export path would enable users without permission to still use the documentor and people who end up having this error (still unknown as to why to me), even though with permission, would be able to set a path themselves.

@JordanRL
Copy link
Owner

JordanRL commented Jul 17, 2021

This error happens when the program cannot create the directories or files that it's generating, usually because of file permissions. The program gets its file permissions from the user that executes the php interpreter.

I'll add an export path option.

JordanRL added a commit that referenced this issue Jul 17, 2021
@JordanRL
Copy link
Owner

Hey, so I pushed changes that should fix this. In reality, Roster wasn't handling Windows paths correctly, which I think was the core issue.

I don't have a Windows setup to actually test it with though. If you could checkout the b-export-path branch and test it that would be fantastic.

@SDanDyS
Copy link
Author

SDanDyS commented Jul 19, 2021

The error remains when I try to generate it via git-bash (the above principle was applied).

How I tried to generate the docs
php vendor/bin/roster C:\xampp\htdocs\framework\classes
php vendor/bin/roster classes

Additional information:
I get the additional information after the error [ERROR] Could not create export path: Check that you have file permissions.

I have checked, I have the permission to modify, create, delete etc. files and directories.

@JordanRL
Copy link
Owner

Alright, I don't think I'll be able to solve this without creating a Windows test-bed with git-bash, so it'll take a bit longer.

JordanRL added a commit that referenced this issue Sep 8, 2021
[#10] Making paths work for Windows
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

2 participants