We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e85f26 commit 1cb003fCopy full SHA for 1cb003f
src/cli/wsh.js
@@ -122,13 +122,18 @@ var wshapi = (function(){
122
123
readFile: function(path){
124
var forReading = 1;
125
- var tf = fso.OpenTextFile(path, forReading);
126
- var allText = tf.ReadAll();
127
- tf.Close();
+ var allText;
+ try {
+ var tf = fso.OpenTextFile(path, forReading);
128
+ allText = tf.ReadAll();
129
+ tf.Close();
130
+ } catch (ex) {
131
+ return "";
132
+ }
133
return allText;
134
}
135
};
136
137
}());
138
-cli(wshapi);
139
+cli(wshapi);
0 commit comments