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

mint build - doesn't work when public dir has a sub folder #38

Closed
kingsleyh opened this issue Jun 17, 2018 · 2 comments
Closed

mint build - doesn't work when public dir has a sub folder #38

kingsleyh opened this issue Jun 17, 2018 · 2 comments
Labels
bug Something isn't working

Comments

@kingsleyh
Copy link

kingsleyh commented Jun 17, 2018

Hi

I pulled the latest mint and built it after upgrading to crystal 0.25 - but when I run mint build I get the following error:

Clearing the "dist" directory... 1.034ms
Unhandled exception: Error reading file: Is a directory (Errno)
  from File@Crystal::System::FileDescriptor#unbuffered_read<Slice(UInt8)>:Int32
  from FileUtils@FileUtils::cp<String, String>:Int32
  from Mint::Builder#initialize:Nil
  from Mint::Cli::Build#parse_and_run:Nil
  from __crystal_main
  from main
⚙ Copying public folder contents...

These are the only files I have in my project dir:

ls -al
total 16
drwxr-xr-x  10 c0252355  1001184655   340 17 Jun 21:38 .
drwxr-xr-x  30 c0252355  1001184655  1020 13 Jun 08:52 ..
drwxr-xr-x  16 c0252355  1001184655   544 17 Jun 21:38 .git
-rw-r--r--   1 c0252355  1001184655    10 13 Jun 08:53 .gitignore
drwxr-xr-x   3 c0252355  1001184655   102 13 Jun 08:54 .mint
drwxr-xr-x   3 c0252355  1001184655   102 17 Jun 14:41 assets
drwxr-xr-x   7 c0252355  1001184655   238 17 Jun 21:38 dist
-rw-r--r--   1 c0252355  1001184655   394 13 Jun 08:53 mint.json
drwxr-xr-x   8 c0252355  1001184655   272 17 Jun 15:51 public
drwxr-xr-x   7 c0252355  1001184655   238 17 Jun 21:33 source
@kingsleyh
Copy link
Author

I think I've found the issue - it's because I have a directory inside the public directory. The current glob doesn't seem to cope with sub directories:

FileUtils.cp Dir.glob("public/**/*"), "dist"

@kingsleyh kingsleyh changed the title Can't package/build code with latest mint mint build - doesn't work when public dir has a sub folder Jun 17, 2018
@gdotdesign gdotdesign added the bug Something isn't working label Jun 18, 2018
@kingsleyh
Copy link
Author

awesome thanks :)

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

No branches or pull requests

2 participants