mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
checkPlugin: Make sure package.json
ends with a newline
This commit is contained in:
parent
bf8d55ab8e
commit
bba47ea2df
1 changed files with 5 additions and 2 deletions
|
@ -42,8 +42,11 @@ const execSync = (cmd, opts = {}) => (childProcess.execSync(cmd, {
|
|||
...opts,
|
||||
}) || '').toString().replace(/\n+$/, '');
|
||||
|
||||
const writePackageJson =
|
||||
(obj) => fs.writeFileSync(`${pluginPath}/package.json`, JSON.stringify(obj, null, 2));
|
||||
const writePackageJson = (obj) => {
|
||||
let s = JSON.stringify(obj, null, 2);
|
||||
if (s.length && s.slice(s.length - 1) !== '\n') s += '\n';
|
||||
return fs.writeFileSync(`${pluginPath}/package.json`, s);
|
||||
};
|
||||
|
||||
const prepareRepo = () => {
|
||||
let branch = execSync('git symbolic-ref HEAD');
|
||||
|
|
Loading…
Reference in a new issue