Skip to content

use os functions instead of running exec #34

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jonmosco
Copy link

@jonmosco jonmosco commented Feb 1, 2024

take advantage of the os packages functions for directory maintenance.

@jonmosco jonmosco requested review from dwelch0 and cubismod February 1, 2024 17:28
Copy link
Contributor

@cubismod cubismod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@dwelch0 dwelch0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

if err != nil {
return err
}
cmd = exec.Command("mkdir", directory)
cmd.Dir = d.workdir
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same filepath change needed here

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -165,9 +162,7 @@ func (d *Downloader) clean(directory string) error {

// clear all items in working directory
func (d *Downloader) clear() error {
cmd := exec.Command("rm", "-rf", UNTAR_DIRECTORY)
cmd.Dir = d.workdir
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

filepath change

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dwelch0 dwelch0 self-requested a review February 14, 2024 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants