Skip to content

Commit

Permalink
revert changes for file_path
Browse files Browse the repository at this point in the history
  • Loading branch information
cscanlin-kwh committed May 2, 2023
1 parent 0127e34 commit d2ff5ab
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions in/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ func (command *Command) Run(destinationDir string, request Request) (Response, e
return Response{}, err
}

destinationPath := filepath.Join(destinationDir, path.Base(remotePath))
if request.Params.Unpack {
destinationPath := filepath.Join(destinationDir, path.Base(remotePath))
mime := archiveMimetype(destinationPath)
if mime == "" {
return Response{}, fmt.Errorf("not an archive: %s", destinationPath)
Expand All @@ -139,10 +139,6 @@ func (command *Command) Run(destinationDir string, request Request) (Response, e
return Response{}, err
}
}
if err = command.WriteFilePathFile(destinationDir, destinationPath); err != nil {
return Response{}, err
}

}

if request.Params.DownloadTags {
Expand Down Expand Up @@ -199,10 +195,6 @@ func (command *Command) writeS3URIFile(destDir string, s3_uri string) error {
return ioutil.WriteFile(filepath.Join(destDir, "s3_uri"), []byte(s3_uri), 0644)
}

func (command *Command) WriteFilePathFile(destDir string, destinationPath string) error {
return ioutil.WriteFile(filepath.Join(destDir, "file_path"), []byte(destinationPath), 0644)
}

func (command *Command) writeVersionFile(destDir string, versionNumber string) error {
return ioutil.WriteFile(filepath.Join(destDir, "version"), []byte(versionNumber), 0644)
}
Expand Down

0 comments on commit d2ff5ab

Please sign in to comment.