From 95e7f14f59a164a68aa5f2910a53b1dfa789da4a Mon Sep 17 00:00:00 2001 From: xavierchanth Date: Fri, 8 Dec 2023 20:30:25 -0500 Subject: [PATCH] fix: sometimes check if error is SshnpError before treating it like one --- packages/sshnoports/bin/sshnp.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sshnoports/bin/sshnp.dart b/packages/sshnoports/bin/sshnp.dart index 65ea731c7..1a5deff32 100644 --- a/packages/sshnoports/bin/sshnp.dart +++ b/packages/sshnoports/bin/sshnp.dart @@ -66,7 +66,7 @@ void main(List args) async { sshClient: SupportedSshClient.fromString(argResults['ssh-client'] as String), ).catchError((e) { - if (e.stackTrace != null) { + if (e is SshnpError && e.stackTrace != null) { Error.throwWithStackTrace(e, e.stackTrace!); } throw e;