kareman / SwiftShell

A Swift framework for shell scripting.
https://kareman.github.io/SwiftShell
MIT License
1.03k stars 87 forks source link

Fix intermediate directories not created #32

Closed DarthMike closed 7 years ago

DarthMike commented 7 years ago

Hello! Thanks for a very useful library!

I've encountered this behaviour, not sure if it was intended: If the destination path contains not created directories, the function would fail where otherwise it is expected to create all directories in the path.

I've added behaviour where the function will automatically created all intermediate directories in the new path.

I've also added tests, but I couldn't get them to fail first in OSX. So I assume my test is OK but I can't prove it running the test suite. Other tests for File don't seem to be running (changing an assertion doesn't make the tests fail. Any ideas on that?

kareman commented 7 years ago

Excellent, this is definitely useful.

I don't know what's up with the tests not running though. I'll take a look when I get back on Monday.

kareman commented 7 years ago

The tests within an AssertNoThrow closure are not being run, which is not good at all. Thanks so much for discovering that. I will fix it after I have merged this.