Update json exception

This commit is contained in:
leedongmyung 2023-12-13 09:02:54 +09:00
parent eb841b8e30
commit 1dba9a958d
2 changed files with 12 additions and 2 deletions

View file

@ -53,7 +53,7 @@ pipeline:
# - exe: zip
commands:
### 콜백이 필요없는 단순 명령 호출
### 콜백이 필요없는 단순 Git 명령 호출
- command: Git
id: git
param:
@ -62,6 +62,14 @@ commands:
- clean -f
- checkout c65a8bb
### Git 최신 리비전으로 업데이트
- command: Git
id: git-update
param:
commands:
- fetch origin
- reset --hard origin/master
### 깃 리비전 정보 저장
- command: GitRev
id: git-rev

View file

@ -1,6 +1,7 @@
import 'dart:convert';
import 'dart:io';
import 'package:oto_cli/cli/cli.dart';
import 'package:oto_cli/oto/commands/command.dart';
import 'package:oto_cli/oto/data/command_data.dart';
@ -35,7 +36,8 @@ class JsonReader extends Command {
throw Exception('Json parsing error: $e');
}
} else {
throw Exception('Json File not exist: $path');
await CLI.println('Json "$path" file not exit. Resturn value to be null.',
color: Color.red);
}
}
}