Skip to content

Commit

Permalink
chore(action): cosmetic fixes
Browse files Browse the repository at this point in the history
Signed-off-by: AtomicFS <vojtech.vesely@9elements.com>
  • Loading branch information
AtomicFS committed Dec 11, 2024
1 parent 0150e37 commit 776751b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
9 changes: 3 additions & 6 deletions action/filesystem/filesystem.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,9 @@ func SaveCurrentRunTime(pathLastRun string) error {

// Create directory if needed
dir := filepath.Dir(pathLastRun)
err := CheckFileExists(dir)
if errors.Is(err, os.ErrNotExist) {
err = os.MkdirAll(dir, os.ModePerm)
if err != nil {
return err
}
err := os.MkdirAll(dir, os.ModePerm)
if err != nil {
return err
}

// Write the current time into file
Expand Down
7 changes: 2 additions & 5 deletions action/recipes/recipes.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,9 @@ func IsDirEmpty(path string) (bool, error) {
// func Execute(ctx context.Context, target string, config *Config, interactive bool, bulldozeMode bool) error {
func Execute(ctx context.Context, target string, config *Config, interactive bool) error {
// Prep
_, err := os.Stat(TimestampsDir)
err := os.MkdirAll(TimestampsDir, os.ModePerm)
if err != nil {
err = os.MkdirAll(TimestampsDir, os.ModePerm)
if err != nil {
return err
}
return err
}

// Find requested target
Expand Down

0 comments on commit 776751b

Please sign in to comment.