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 <ks3913688@gmail.com>
  • Loading branch information
h4l0gen authored and poiana committed Apr 2, 2024
1 parent 5e65be2 commit 767157d
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 767157d

Please sign in to comment.