Skip to content

Commit be08534

Browse files
authored
Pass only target to mayhem download, not project/target. (#167)
* Pass only target to mayhem download, not project/target. * Fix how target is computed using sed.
1 parent a0f85b3 commit be08534

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

dist/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,11 @@ function run() {
188188
exit 2;
189189
fi
190190

191-
target=$(echo $run | cut -d'/' -f2)
191+
# Strip the run number from the full run path to get the project/target.
192+
target=$(echo $run | sed 's:/[^/]*$::')
192193

193194
if [ -n "${coverageOutput}" ]; then
194-
${cli} --verbosity ${verbosity} download --owner ${owner} ${project}/$target -o ${coverageOutput};
195+
${cli} --verbosity ${verbosity} download --owner ${owner} $target -o ${coverageOutput};
195196
fi
196197
`;
197198
process.env["MAYHEM_TOKEN"] = mayhemToken;

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,11 @@ async function run(): Promise<void> {
161161
exit 2;
162162
fi
163163
164-
target=$(echo $run | cut -d'/' -f2)
164+
# Strip the run number from the full run path to get the project/target.
165+
target=$(echo $run | sed 's:/[^/]*$::')
165166
166167
if [ -n "${coverageOutput}" ]; then
167-
${cli} --verbosity ${verbosity} download --owner ${owner} ${project}/$target -o ${coverageOutput};
168+
${cli} --verbosity ${verbosity} download --owner ${owner} $target -o ${coverageOutput};
168169
fi
169170
`;
170171

0 commit comments

Comments
 (0)