Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Make code simpler
  • Loading branch information
Alcedo Nathaniel De Guzman Jr committed Feb 26, 2019
commit 9f566c52034d0a3128f6ec401be0f6f792637bed
5 changes: 2 additions & 3 deletions e2e/Utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,10 @@ export const writeFiles = (
const filename = filePath.pop(); // filepath becomes dirPath (no filename)

if (filePath.length) {
createDirectory(path.join.apply(path, [directory].concat(filePath)));
createDirectory(path.join(directory, ...filePath));
}
fs.writeFileSync(
// @ts-ignore
path.resolve.apply(path, [directory].concat(filePath, [filename])),
path.resolve(directory, ...filePath, filename || ''),
files[fileOrPath],
);
});
Expand Down