Skip to content

Commit

Permalink
Merge pull request #143 from snyk/fix/sbt-output-getting-truncate
Browse files Browse the repository at this point in the history
fix: enhance sbt output width
  • Loading branch information
37IulianPopovici committed Mar 22, 2024
2 parents 24181bb + dfb9c5f commit aff5819
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ export function buildArgs(
} else if (isCoursierProject) {
args.push('coursierDependencyTree'); // coursier
} else {
// enhance sbt default output width from 40 chars to the max
args.push('set asciiGraphWidth := 999999999');
args.push('dependencyTree'); // sbt native
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"lint": "eslint --color --cache 'lib/**/*.{js,ts}'",
"format": "prettier --write '{lib,test}/**/*.{js,ts}'",
"prepare": "npm run build",
"test": "jest --runInBand -b --testTimeout=100000"
"test": "jest --runInBand -b --testTimeout=200000"
},
"author": "snyk.io",
"license": "Apache-2.0",
Expand Down
3 changes: 3 additions & 0 deletions test/functional/sbt-plugin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ test('check build args with array not coursier', () => {
'-Dsbt.log.noformat=true',
'-Paxis',
'-Pjaxen',
'set asciiGraphWidth := 999999999',
'dependencyTree',
]);
});
Expand All @@ -15,6 +16,7 @@ test('check build args with string not coursie', () => {
expect(result).toEqual([
'-Dsbt.log.noformat=true',
'-Paxis -Pjaxen',
'set asciiGraphWidth := 999999999',
'dependencyTree',
]);
});
Expand Down Expand Up @@ -61,6 +63,7 @@ test('check build args with string for not coursier and not snykRenderTree', ()
expect(result).toEqual([
'-Dsbt.log.noformat=true',
'-Paxis -Pjaxen',
'set asciiGraphWidth := 999999999',
'dependencyTree',
]);
});

0 comments on commit aff5819

Please sign in to comment.