aidp 0.49.17 → 0.49.18
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.
- checksums.yaml +4 -4
- data/lib/aidp/harness/completion_checker.rb +19 -3
- data/lib/aidp/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 72094343c4cb811f45802e8bca991151f1217682bfe9924fdef242f8c8053004
|
|
4
|
+
data.tar.gz: 80c5d64fa5345ada2c37d957ad1fe9663a5311ae7a4643941c80aececcb1a2d3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 369997eba3b55c78bc6319ea393e4a35a087fa019e7c8592147da40a0514ba859ce9cf74d5724b5a95e9805983fbb3de36cf3eb04623d7c75c645f3db7a77739
|
|
7
|
+
data.tar.gz: b0e5be3533c78df9ed64a68a1419547e6f73d1b25e601fc4b8f92215040f07224e69d92d771c44fd8196befa0b3a6313c61e7178ee1edea54205185e47fb926f
|
|
@@ -81,10 +81,26 @@ module Aidp
|
|
|
81
81
|
build_commands.any? { |cmd| run_project_command(cmd) }
|
|
82
82
|
end
|
|
83
83
|
|
|
84
|
-
# Run a detected command in the project directory
|
|
85
|
-
#
|
|
84
|
+
# Run a detected command in the project directory. The command line is
|
|
85
|
+
# tokenized with Shellwords and executed in argument form, so the shell
|
|
86
|
+
# never interprets the library-provided command string. The [cmdname,
|
|
87
|
+
# argv0] pair forces argument form even for a single-token command,
|
|
88
|
+
# which system would otherwise execute via /bin/sh -c.
|
|
86
89
|
def run_project_command(cmd)
|
|
87
|
-
|
|
90
|
+
require "shellwords"
|
|
91
|
+
argv = Shellwords.split(cmd).flat_map { |arg| expand_arg(arg) }
|
|
92
|
+
return false if argv.empty?
|
|
93
|
+
|
|
94
|
+
system([argv[0], argv[0]], *argv.drop(1), chdir: @project_dir, out: File::NULL, err: File::NULL)
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Expand shell-style glob tokens (e.g. test/**/*_test.rb) within the
|
|
98
|
+
# project directory, since argument-form execution skips shell globbing.
|
|
99
|
+
def expand_arg(arg)
|
|
100
|
+
return [arg] unless arg.match?(/[*?\[{}]/)
|
|
101
|
+
|
|
102
|
+
matches = Dir.chdir(@project_dir) { Dir.glob(arg) }
|
|
103
|
+
matches.empty? ? [arg] : matches
|
|
88
104
|
end
|
|
89
105
|
|
|
90
106
|
def documentation_complete?
|
data/lib/aidp/version.rb
CHANGED