MCPcopy Create free account
hub / github.com/flant/shell-operator / createExecutableFile

Function createExecutableFile

pkg/utils/file/file_test.go:50–58  ·  view source on GitHub ↗
(file string)

Source from the content-addressed store, hash-verified

48}
49
50func createExecutableFile(file string) error {
51 if _, err := os.Create(file); err != nil {
52 return fmt.Errorf("create: %w", err)
53 }
54
55 _ = os.Chmod(file, 0o777)
56
57 return nil
58}
59
60func TestRecursiveGetExecutablePaths(t *testing.T) {
61 dir, err := prepareTestDirTree()

Callers 1

prepareTestDirTreeFunction · 0.85

Calls 1

CreateMethod · 0.80

Tested by

no test coverage detected