From 05590607fa1b7126f1d99b22d29ce4f054a11083 Mon Sep 17 00:00:00 2001 From: burhandodhy Date: Mon, 2 Oct 2017 19:47:29 +0500 Subject: [PATCH] Fix Issue #13 option "--no-patch" not known --- lib/phpcbf.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/phpcbf.js b/lib/phpcbf.js index fe48162..fbc139c 100644 --- a/lib/phpcbf.js +++ b/lib/phpcbf.js @@ -50,8 +50,9 @@ export default { return atom.notifications.addError('Could not find phpcbf executable.', {detail: err.message}); } - let tempFile = tempWrite.sync(editor.getText()); - let args = ['--no-patch', `--standard=${this.standard}`, tempFile]; + let tempFile = atom.workspace.getActiveTextEditor().getPath(); + + let args = [`--standard=${this.standard}`, tempFile]; childProcess.execFile(phpcbf, args, (err, stdOut, stdErr) => { // PHPCBF exits 1 for no apparent reason so we need to check stdErr is not empty. if (err && stdErr.length) {