Skip to content
This repository has been archived by the owner on Sep 6, 2020. It is now read-only.

Fix Issue #13 option "--no-patch" not known #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/phpcbf.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down