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 dc70704 commit cb34c18Copy full SHA for cb34c18
src/main.rs
@@ -550,12 +550,19 @@ impl Executor {
550
.hidden(false)
551
.print_commands(false)
552
.build();
553
- let result = ps
554
- .run(self.pop_stack().get_string().as_str())
555
- .unwrap()
556
- .stdout()
557
- .unwrap();
558
- self.stack.push(Type::String(result));
+ let result = ps.run(self.pop_stack().get_string().as_str());
+ match result {
+ Ok(i) => self.stack.push(Type::String(
+ i.stdout()
+ .unwrap_or("".to_string())
+ .as_str()
559
+ .trim()
560
+ .to_string(),
561
+ )),
562
+ Err(_) => {
563
+ self.log_print("エラー! シェルスクリプトの実行に失敗しました".to_string())
564
+ }
565
566
}
567
568
// プロセスを終了
0 commit comments