Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Patryk-Buczkowski committed Aug 14, 2024
1 parent 5c38efe commit d1ae2eb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ const fs = require('fs');
const args = process.argv.slice(2);
const [source, destination] = args;

if (args.length !== 2) {
console.error('Usage: node yourScript.js <source> <destination>');
function cp(location1, location2) {
if (args.length !== 2) {
console.error('Usage: node yourScript.js <source> <destination>');

process.exit(1);
}
return;
}

function cp(location1, location2) {
try {
fs.copyFileSync(location1, location2);
console.log('File copied');
Expand Down

0 comments on commit d1ae2eb

Please sign in to comment.