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

path flag of generator not working #426

Open
simon-winter opened this issue Nov 23, 2024 · 8 comments
Open

path flag of generator not working #426

simon-winter opened this issue Nov 23, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@simon-winter
Copy link

Describe the bug
whatever i write into the path flag for the jet generator has no influence on the destination path. When using the example path ./gen, the resulting files still just get generated into my workspace root with this structure: "DBName/schemaName/..."
there is no .gen folder created. When i create that first or try a different naming, still it is not copyied inside there nor a folder is created. it just cares about the database name and schema name for the path of generation.

Environment (please complete the following information):

  • OS: Windows 11
  • Database: postgres
@simon-winter simon-winter added the bug Something isn't working label Nov 23, 2024
@jamius19
Copy link
Contributor

What's the full command you ran?

@simon-winter
Copy link
Author

Correction: it seems on windows/vscode terminal the "./" infront of the .gen folder is the problem. when using . path the entire path is not used.

jet -dsn=postgresql://postgres:postgres@localhost:5432/webDev?sslmode=disable -schema=public -path=./test //broken
jet -dsn=postgresql://postgres:postgres@localhost:5432/webDev?sslmode=disable -schema=public -path=test //working

@jamius19
Copy link
Contributor

jamius19 commented Nov 23, 2024

That's interesting, the relative path with ./ should work. I'll check on a windows machine.
Is the behavior same when using cmd or powershell?

@simon-winter
Copy link
Author

Yes, tested with powershell, also omited relative path. The debug output of the generator also completly omits the relative path:
'Destination directory: webDev/public' -> missing the "test" folder when provided as relative path.
having non relative path is interpreted as relative path though, meaning the ./ is unnecessary

@jamius19
Copy link
Contributor

jamius19 commented Nov 23, 2024

The debug output of the generator also completly omits the relative path

That's when the path is ./test right?

having non relative path is interpreted as relative path though, meaning the ./ is unnecessary

I agree, but then again path handling in Windows is a bit different.

Can you please try with this command and let me know?
jet -dsn=postgresql://postgres:postgres@localhost:5432/webDev?sslmode=disable -schema=public -path=.\test

@simon-winter
Copy link
Author

simon-winter commented Nov 23, 2024

That's when the path is ./test right?

yes, if the path is relative it seems to get completly ignored and omited.

Can you please try with this command and let me know?
jet -dsn=postgresql://postgres:postgres@localhost:5432/webDev?sslmode=disable -schema=public -path=.\test

same behavior, path omited

@jamius19
Copy link
Contributor

Interesting, .\test on Windows should have worked per my understanding.
I'll look into it.

@jamius19
Copy link
Contributor

jamius19 commented Nov 23, 2024

Confirmed relative names starting with ./ and .\ don't work on Windows.
I'll investigate it.

Also affects Issue #413 and PR #424

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants