From a9dfe1c5cd0bf04dffe9e31a9ed35fe37ca32207 Mon Sep 17 00:00:00 2001 From: cscanlin Date: Wed, 3 May 2023 18:08:17 -0700 Subject: [PATCH] revert changes for file_path Signed-off-by: cscanlin --- README.md | 2 -- in/command.go | 10 +--------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/README.md b/README.md index 718d3550..5bb5f510 100644 --- a/README.md +++ b/README.md @@ -110,8 +110,6 @@ Places the following files in the destination: * `s3_uri`: A file containing the S3 URI of the object (for use with `aws cp`, etc.) -* `file_path`: A file containing the absolute path to the downloaded filename (if `skip_download` is not `true`). Makes for easy use with the `load_var` step - * `version`: The version identified in the file name. * `tags.json`: The object's tags represented as a JSON object. Only written if `download_tags` is set to true. diff --git a/in/command.go b/in/command.go index a106c9ad..13d6ca45 100644 --- a/in/command.go +++ b/in/command.go @@ -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) @@ -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 { @@ -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) }