Skip to content

Commit

Permalink
Update modify_shell_configuration_file.go
Browse files Browse the repository at this point in the history
Signed-off-by: Kapil Sharma <[email protected]>
  • Loading branch information
h4l0gen committed Apr 2, 2024
1 parent 3f9328c commit 6de118a
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions events/syscall/modify_shell_configuration_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,9 @@ func ModifyShellConfigurationFile(h events.Helper) error {
tmpDir := "/tmp"
tmpConfigFile := filepath.Join(tmpDir, ".bashrc")

// Create the file
file, err := os.Create(tmpConfigFile)
if err != nil {
return err
}
file.Close()

// Modify the file
content := []byte("# written by event-generator\n")
err = os.WriteFile(tmpConfigFile, content, 0644)
err := os.WriteFile(tmpConfigFile, content, 0644)
if err != nil {
return err
}
Expand Down

0 comments on commit 6de118a

Please sign in to comment.