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

Unix.Unix_error(20, "mkdir", "Program.js/src") #10361

Closed
qrp73 opened this issue Aug 25, 2021 · 2 comments
Closed

Unix.Unix_error(20, "mkdir", "Program.js/src") #10361

qrp73 opened this issue Aug 25, 2021 · 2 comments

Comments

@qrp73
Copy link

qrp73 commented Aug 25, 2021

I catch issue which is similar to #6212

Catch the same issue in haxe-4.2.3-win.exe

Program.hx:

class Program {
  static function main() {
    trace('Hello World');
  }
}
haxelib install hxcs
haxe -main Program.hx -cs Program.js

Note: here is mistake, I forgot to change extension to *.cs and got this error:

Unix.Unix_error(20, "mkdir", "Program.js/src")

When I fixed extension to *.cs:

haxe -main Program.hx -cs Program.cs

it works fine. But it is not obvious to find mistake from such non-relevant error

@ibilon
Copy link
Member

ibilon commented Aug 25, 2021

To reproduce create a file and use it as path for --cs (or any folder based output target).
Maybe it only checks that the output path exists but not that it's a folder?

@qrp73 the --cs command line argument take a folder as next parameter, not a file, you'd usually do something like --cs build/.

@qrp73
Copy link
Author

qrp73 commented Aug 26, 2021

yeah, I have Program.js file in the same folder, so it cannot create folder with the same name, but I realize it just now. :)

When I catch this error it looks for me more like unknown error in some Unix like call.
It will be more clean to show error message which explains that it cannot create folder with such name.

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