From 1dba9a958d920c4f3046883b57cc34428c70996d Mon Sep 17 00:00:00 2001 From: leedongmyung Date: Wed, 13 Dec 2023 09:02:54 +0900 Subject: [PATCH] Update json exception --- assets/pipeline-test.yaml | 10 +++++++++- lib/oto/commands/util/json.dart | 4 +++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/assets/pipeline-test.yaml b/assets/pipeline-test.yaml index 77bbecd..7b6c425 100644 --- a/assets/pipeline-test.yaml +++ b/assets/pipeline-test.yaml @@ -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 diff --git a/lib/oto/commands/util/json.dart b/lib/oto/commands/util/json.dart index cd95c65..ce182e6 100644 --- a/lib/oto/commands/util/json.dart +++ b/lib/oto/commands/util/json.dart @@ -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); } } }