Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): accept folders names with dots #3775

Merged
merged 3 commits into from
Jun 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/go-ci-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Run docker image and generate results.json
run: |
docker run -v ${PWD}/assets/queries:/path \
kics:${{ github.sha }} scan --silent --ignore-on-exit "results" --log-level DEBUG --log-file --log-path "/path/info.log" -p "/path" -o "/path/results.json"
kics:${{ github.sha }} scan --silent --ignore-on-exit "results" --log-level DEBUG --log-file --log-path "/path/info.log" -p "/path" -o "/path/"
- name: Archive test logs
uses: actions/upload-artifact@v2
if: always()
Expand Down
2 changes: 1 addition & 1 deletion internal/console/kics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func TestConsole_Execute(t *testing.T) { //nolint
t.Errorf("failed to get current dir, %v", err)
}
if tt.remove != "" {
err = os.Remove(filepath.Join(currentWorkDir, tt.remove))
err = os.RemoveAll(filepath.Join(currentWorkDir, tt.remove))
if err != nil {
t.Errorf("failed to remove file: %v, %v", tt.remove, err)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/console/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func run(cmd *cobra.Command) error {
}
outputName = filepath.Base(outputName)
if filepath.Ext(outputPath) != "" {
outputPath = filepath.Dir(outputPath)
outputPath = filepath.Join(outputPath, string(os.PathSeparator))
}
if err := os.MkdirAll(outputPath, os.ModePerm); err != nil {
return err
Expand Down