diff --git a/lib/manager/travis/update.js b/lib/manager/travis/update.js index 6365d34e4859bcd45e4f4b0823b2bc503498aa98..f03806ee1a752e3247d767eda221465d6a0b856d 100644 --- a/lib/manager/travis/update.js +++ b/lib/manager/travis/update.js @@ -8,9 +8,14 @@ function setNewValue(currentFileContent, upgrade) { try { logger.debug(`node.setNewValue: ${upgrade.newVersion}`); const indent = detectIndent(currentFileContent).indent || ' '; + const quote = + currentFileContent.split(`'`).length > + currentFileContent.split(`"`).length + ? `'` + : `"`; let newString = `\nnode_js:\n`; upgrade.newVersion.forEach(version => { - newString += `${indent}- '${version}'\n`; + newString += `${indent}- ${quote}${version}${quote}\n`; }); return currentFileContent.replace(/\nnode_js:(\n\s+[^\n]+)+\n/, newString); } catch (err) {