Ensure DEBUG is unset when executing bundle show#8891
Ensure DEBUG is unset when executing bundle show#8891iangreenleaf wants to merge 2 commits intoactiveadmin:masterfrom
bundle show#8891Conversation
|
Hi, thanks for this PR. I see the problem and I can replicate, however it seems that
|> WSL (Windows) | It advises to use javascript like this:
I'm not familiar with this process, so I'll leave the decision to others PS: The CI looks broken, it looks like something is wrong with bundler and the latest version does not match the installed version |
|
Oh great, that's a better solution! I was able to use destructuring to clean it up a little more. |
|
@tagliala I'm guessing the CI failures are unrelated to this branch and I don't need to do anything about them? |
Sorry, I said yesterday "I'll take a look" but I forgot. I think failures are unrelated. I'll give a fix later today and I'll ping here |
|
@iangreenleaf I've fixed the CI. Could you please rebase and confirm that the JS-only solution fixes the issue you are experiencing? I've only tested in |
If DEBUG is set, bundler will output extra messaging to stdout, causing an incorrect path to be set and screwing up asset compilation.
927d0c3 to
0614571
Compare
|
@tagliala I can confirm that this version is working great for me and fixes the issue! |
|
Did the CI broke again? |
|
Nope, this does not look like a failure caused by bundler version mismatch |
When the DEBUG environment variable is set (even if empty), bundler may output additional messages to stdout, such as "Found no changes, using resolution from the lockfile". This can interfere with asset compilation, as scripts expecting a single path may instead receive multiple output lines, causing path corruption. This commit adjusts the logic to always use the last line of the output from `bundle show activeadmin`, preventing such issues even if extraneous lines are present due to DEBUG or other future messaging changes. Ref: #8891
When the DEBUG environment variable is set (even if empty), bundler may output additional messages to stdout, such as "Found no changes, using resolution from the lockfile". This can interfere with asset compilation, as scripts expecting a single path may instead receive multiple output lines, causing path corruption. This commit adjusts the logic to always use the last line of the output from `bundle show activeadmin`, preventing such issues even if extraneous lines are present due to DEBUG or other future messaging changes. Ref: #8891
|
Update: found the issue on the CI That line is not used in the CI and is required to be a single line because of this: activeadmin/spec/support/rails_template.rb Lines 100 to 102 in 511f8b7 I'm making some experiments |
When the DEBUG environment variable is set (even if empty), bundler may output additional messages to stdout, such as "Found no changes, using resolution from the lockfile". This can interfere with asset compilation, as scripts expecting a single path may instead receive multiple output lines, causing path corruption. This commit adjusts the logic to always use the last line of the output from `bundle show activeadmin`, preventing such issues even if extraneous lines are present due to DEBUG or other future messaging changes. Ref: #8891
|
@iangreenleaf can you please give a try at #8895 ? Is there anyone with a windows machine available to test #8895 ? Using the CI on windows will not work because that line is being replaced |
|
Superseded by #8895, commit ownership preserved there, thanks! |
When the DEBUG environment variable is set (even if empty), bundler may output additional messages to stdout, such as "Found no changes, using resolution from the lockfile". This can interfere with asset compilation, as scripts expecting a single path may instead receive multiple output lines, causing path corruption. This commit adjusts the logic to always use the last line of the output from `bundle show activeadmin`, preventing such issues even if extraneous lines are present due to DEBUG or other future messaging changes. Ref: #8891
When the DEBUG environment variable is set (even if empty), bundler may output additional messages to stdout, such as "Found no changes, using resolution from the lockfile". This can interfere with asset compilation, as scripts expecting a single path may instead receive multiple output lines, causing path corruption. This commit adjusts the logic to always use the last line of the output from `bundle show activeadmin`, preventing such issues even if extraneous lines are present due to DEBUG or other future messaging changes. Ref: #8891
When the DEBUG environment variable is set (even if empty), bundler may output additional messages to stdout, such as "Found no changes, using resolution from the lockfile". This can interfere with asset compilation, as scripts expecting a single path may instead receive multiple output lines, causing path corruption. This commit adjusts the logic to always use the last line of the output from `bundle show activeadmin`, preventing such issues even if extraneous lines are present due to DEBUG or other future messaging changes. Ref: #8891
When the DEBUG environment variable is set (even if empty), bundler may output additional messages to stdout, such as "Found no changes, using resolution from the lockfile". This can interfere with asset compilation, as scripts expecting a single path may instead receive multiple output lines, causing path corruption. This commit adjusts the logic to always use the last line of the output from `bundle show activeadmin`, preventing such issues even if extraneous lines are present due to DEBUG or other future messaging changes. Ref: #8891
This was an unpleasant bug I ran into while trying to get my source compilation sorted out (cruelly, I had turned DEBUG on to help me troubleshoot a different problem).
If DEBUG is set at all in the environment, even as an empty string with
DEBUG=, bundler will output an extra message:Because this goes to stdout, it gets included in the path the config file is using and asset compilation fails. Given that other people may well have this set in their envs for legitimate reasons, it seems wise to take precautions to ensure it doesn't blow up asset compilation.