diff --git a/packages/sshnoports/bin/sshnp.dart b/packages/sshnoports/bin/sshnp.dart index 287058350..d44ce6362 100644 --- a/packages/sshnoports/bin/sshnp.dart +++ b/packages/sshnoports/bin/sshnp.dart @@ -63,7 +63,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;