Skip to content

setup:static-content:deploy --dry-run incorrectly creates requirejs-config.js files #6545

Closed
@davidalger

Description

@davidalger

When running the CLI tool in Magento 2 and specifying the --dry-run flag, nothing should be altered by the tool. This flag fails to suppress creation of the requirejs-config.js files when --dry-run is specified.

Versions affected: Magento 2.1.x, 2.0.x.

The following steps to reproduce are run against Magento 2.1.1.

$ rm -rf pub/static
$ magento setup:static-content:deploy --dry-run  --no-javascript --no-css --no-less --no-images --no-fonts --no-html --no-misc --no-html-minify
Requested languages: en_US
Requested areas: frontend, adminhtml
Requested themes: Magento/blank, Magento/luma, Magento/backend
Dry run. Nothing will be recorded to the target directory.
Dry run. Nothing will be recorded to the target directory.
Dry run. Nothing will be recorded to the target directory.
=== frontend -> Magento/luma -> en_US ===
.
Successful: 1 files; errors: 0

---

New version of deployed files: 1473348444
=== frontend -> Magento/blank -> en_US ===
=== adminhtml -> Magento/backend -> en_US ===
..
Successful: 1 files; errors: 0

---

New version of deployed files: 1473348444

Successful: 1 files; errors: 0

---

New version of deployed files: 1473348444
$ tree pub/static
pub/static
└── _requirejs
    ├── adminhtml
    │   └── Magento
    │       └── backend
    │           └── en_US
    │               └── requirejs-config.js
    └── frontend
        └── Magento
            ├── blank
            │   └── en_US
            │       └── requirejs-config.js
            └── luma
                └── en_US
                    └── requirejs-config.js

11 directories, 3 files
$ magento -V
Magento CLI version 2.1.1 

As you can see, by removing the entire pub/static directory and then running the setup:static-content:deploy command with --dry-run specified, three files were created by the tool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is not validGate 1 Failed. Automatic verification of issue format is failedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releasebug reporttriage wanted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions