mirror of
https://github.com/apple/pkl.git
synced 2026-03-30 22:02:10 +02:00
Fix NPE when handling ExternalReader specs with null arguments (#882)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -107,7 +107,9 @@ final class ExternalReaderProcessImpl implements ExternalReaderProcess {
|
||||
// This relies on Java/OS behavior around PATH resolution, absolute/relative paths, etc.
|
||||
var command = new ArrayList<String>();
|
||||
command.add(spec.executable());
|
||||
command.addAll(spec.arguments());
|
||||
if (spec.arguments() != null) {
|
||||
command.addAll(spec.arguments());
|
||||
}
|
||||
|
||||
var builder = new ProcessBuilder(command);
|
||||
builder.redirectError(Redirect.INHERIT); // inherit stderr from this pkl process
|
||||
|
||||
Reference in New Issue
Block a user