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

Fix: Create Output Directories if Don't Exist #9

Merged
merged 3 commits into from
Jul 8, 2020

Conversation

nizarmah
Copy link
Owner

@nizarmah nizarmah commented Jul 8, 2020

This pull request resolves the issue #8. This testing branch for this issue can be found on auto-minify-test/issues#8.

The successful GitHub Action can be found here.

Now, when the output directory is specified, it is created if it doesn't exist.
In addition, if the directory is nested (eg. js/*), all the sub-directories in the js directory are then created in the output directory.

For example, consider the following

directory: 'js/*'
output: 'production/js'

if $output doesn't exist:
    create $output directory

go through directory:
    for example, we reach '$directory/something'
    if '$output/something' doesn't exist:
        create '$output/something' directory

IN_PATH would be empty if the IN_DIR is an actual directory and not a wild card. Therefore, it is important to be equal to F_DIR in order to be removed when adding the Sub Directory for the Output Directory
@nizarmah nizarmah merged commit 39cc9ce into master Jul 8, 2020
@nizarmah nizarmah deleted the bug/create_directory_if_not_exist branch July 8, 2020 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant