Skip to content

Commit

Permalink
fix: fix debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed Mar 7, 2020
1 parent e550118 commit 71527b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 3 additions & 3 deletions lib/createInlinePluginCreator.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,15 +205,15 @@ function createInlinePluginCreator(packages, multiContext) {
// Need this because: when semanticRelease() does several `git push` simultaneously some will fail due to refs not being locked.
// (semantic-release should probably use `execa.sync()` to ensure Git operations are atomic — if they do there should be no issues with doing several releases at once).
await wait(() => todo()[0] === pkg);

// Prevent deps change rollback.
updateManifestDeps(pkg, path);
}

// These steps just passthrough to plugins.
const verifyConditions = (pluginOptions, context) => plugins.verifyConditions(context);
const verifyRelease = (pluginOptions, context) => plugins.verifyRelease(context);
const publish = async (pluginOptions, context) => {
// Prevent deps change rollback.
updateManifestDeps(pkg, path);

const result = await plugins.publish(context);
// istanbul ignore next
return result.length ? result[0] : {};
Expand Down
4 changes: 1 addition & 3 deletions lib/debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ const logger = getLogger({
let opts;

const createDebugger = prefix => (...input) => {
const enabled = get(opts, "debug" + (prefix ? "." + prefix : ""));

if (enabled) {
if (get(opts, prefix || "")) {
return logger.log(...input);
}
};
Expand Down

0 comments on commit 71527b2

Please sign in to comment.