Skip to content

Commit

Permalink
fix(config): path in cli run
Browse files Browse the repository at this point in the history
  • Loading branch information
exiguus committed Dec 8, 2023
1 parent cc37e29 commit dd96a75
Show file tree
Hide file tree
Showing 9 changed files with 140 additions and 37 deletions.
2 changes: 1 addition & 1 deletion badges/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 13 additions & 1 deletion dist/fta/config.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/fta/output.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 6 additions & 8 deletions dist/fta/run.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/fta/types.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

110 changes: 91 additions & 19 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/output.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions dist/tmp-config-file.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 4 additions & 8 deletions src/fta/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,19 +131,15 @@ export async function run(
// output
// details is the output of the fta command with the format option
// details are also saved to a file in the github action
const configFile = path.join(__dirname, TMP_CONFIG_FILE)
const filePath = path.join(__dirname, file_path)
const details = execSync(
`npm exec --package=fta-cli -c 'fta ${path.join(
__dirname,
file_path
)} --config-path ${TMP_CONFIG_FILE} --format ${mappedOptions.format}'`
`npm exec --package=fta-cli -c 'fta ${filePath} --config-path ${configFile} --format ${mappedOptions.format}'`
).toString()
// summary is the output of the fta command with the table format option
// to have a quick look at the results
const summary = execSync(
`npm exec --package=fta-cli -c 'fta ${path.join(
__dirname,
file_path
)} --config-path ${TMP_CONFIG_FILE}--format table'`
`npm exec --package=fta-cli -c 'fta ${filePath} --config-path ${configFile} --format table'`
).toString()

if (output_path) {
Expand Down

0 comments on commit dd96a75

Please sign in to comment.