diff --git a/clite/commands.js b/clite/commands.js index 8067bca..a4f709a 100644 --- a/clite/commands.js +++ b/clite/commands.js @@ -231,9 +231,18 @@ Options: return 1; } + function loadRemote(fd) { + if (!fd) { + io.error('unable to create file: '+file); + io.exit(1); + return; + } + io.exit(0); + } + if (!stdio.creat(file)) { - io.error('unable to create file: '+file); - return 1; + var fd = stdio.open(file,loadRemote); + return null; } return 0;