Skip to content

Commit

Permalink
Merge pull request #721 from kyonRay/master
Browse files Browse the repository at this point in the history
<sync>(project): sync code from release-3.1.1
  • Loading branch information
kyonRay authored Dec 15, 2022
2 parents 4dba326 + 0e68306 commit 4395f51
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, ubuntu-20.04, ubuntu-22.04, windows-2019, macos-12]
os: [ubuntu-18.04, ubuntu-20.04, ubuntu-22.04, windows-2019, macos-latest]
steps:
- uses: actions/checkout@v2
with:
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/console/Console.java
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,11 @@ public static void main(String[] args) {
System.out.println(
"Current ledger crypto type is ECDSA, please make sure the account is a ecdsa account!");
}
logger.error("SignatureException, e: ", e);
} catch (ClassNotFoundException e) {
System.out.println(e.getMessage() + " does not exist.");
System.out.println();
logger.error("ClassNotFoundException, e:", e);
} catch (IOException e) {
if (e.getMessage().startsWith("activeConnections")) {
System.out.println(
Expand All @@ -192,10 +194,12 @@ public static void main(String[] args) {
logger.error("IOException, e:", e);
}
System.out.println();
logger.error("IOException, e:", e);
} catch (InvocationTargetException e) {
Throwable targetException = e.getTargetException();
System.out.println(targetException.getMessage());
System.out.println();
logger.error("InvocationTargetException, e:", e);
} catch (UserInterruptException e) {
consoleInitializer.stop();
break;
Expand Down
7 changes: 6 additions & 1 deletion src/main/java/console/contract/utils/ContractCompiler.java
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,12 @@ public static void saveAbiAndBin(
File binPath =
new File(saveDir.getAbsolutePath() + File.separator + contractName + BIN_SUFFIX);
File smBinPath =
new File(saveDir.getAbsolutePath() + contractName + SM_SUFFIX + BIN_SUFFIX);
new File(
saveDir.getAbsolutePath()
+ File.separator
+ contractName
+ SM_SUFFIX
+ BIN_SUFFIX);

if (Objects.nonNull(abiAndBin.getAbi()) && !abiAndBin.getAbi().isEmpty()) {
FileUtils.writeStringToFile(abiPath, abiAndBin.getAbi());
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/console/precompiled/PrecompiledImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ public void makeDir(String[] params) throws Exception {
String[] fixedBfsParams = ConsoleUtils.fixedBfsParams(params, pwd);
String path = fixedBfsParams[1];
RetCode mkdir = bfsService.mkdir(path);
logger.info("mkdir: make new dir {}", path);
logger.info("mkdir: make new dir {}, retCode {}", path, mkdir);
if (mkdir.getCode() == PrecompiledRetCode.CODE_FILE_INVALID_PATH.getCode()) {
if (!path.startsWith("/apps/") && !path.startsWith("/tables/")) {
System.out.println("Only permitted to mkdir in '/apps/' and '/tables/'");
Expand Down

0 comments on commit 4395f51

Please sign in to comment.