@agi-cli/sdk 0.1.40 → 0.1.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/tools/loader.ts +4 -1
package/package.json
CHANGED
package/src/tools/loader.ts
CHANGED
|
@@ -298,7 +298,10 @@ function createHelpers(projectRoot: string, toolDir: string) {
|
|
|
298
298
|
const pieces = commandLine.trim().split(/\s+/).filter(Boolean);
|
|
299
299
|
if (pieces.length === 0)
|
|
300
300
|
throw new Error('Empty command passed to template executor');
|
|
301
|
-
|
|
301
|
+
const firstPiece = pieces[0];
|
|
302
|
+
if (!firstPiece)
|
|
303
|
+
throw new Error('Empty command passed to template executor');
|
|
304
|
+
return exec(firstPiece, pieces.slice(1));
|
|
302
305
|
};
|
|
303
306
|
return {
|
|
304
307
|
exec,
|