Skip to content

Commit 89bdc25

Browse files
committed
fix: Don't clear folder when extracting zip
1 parent 9be4bc6 commit 89bdc25

File tree

4 files changed

+5
-8
lines changed

4 files changed

+5
-8
lines changed

features/src/gitlab-cli/installer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func (c *glabComponent) InstallVersion(version *gover.Version) error {
8383
if err := installer.Tools.Download.ToFile(downloadUrl, fileName, "GitLab CLI"); err != nil {
8484
return err
8585
}
86-
//Extract the tar.gz file
86+
// Extract the tar.gz file
8787
if err := installer.Tools.Compression.ExtractTarGz(fileName, "/usr/local/bin/", true); err != nil {
8888
return err
8989
}

features/src/gonovate/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Installs Gonovate.
66

77
```json
88
"features": {
9-
"ghcr.io/postfinance/devcontainer-features/gonovate:0.1.0": {
9+
"ghcr.io/postfinance/devcontainer-features/gonovate:0.1.1": {
1010
"version": "latest",
1111
"downloadUrl": ""
1212
}

features/src/gonovate/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "gonovate",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"name": "Gonovate",
55
"description": "Installs Gonovate.",
66
"options": {

installer/compression.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,8 @@ func (c *compression) Extract(filePath string, dstPath string, withoutRootFolder
3636
}
3737

3838
func (c *compression) ExtractZip(filePath string, dstPath string, withoutRootFolder bool) error {
39-
// Make sure the destination path exits and is clean
40-
if err := os.RemoveAll(dstPath); err != nil {
41-
return fmt.Errorf("failed cleaning destination folder: %w", err)
42-
}
43-
if err := os.MkdirAll(dstPath, 0755); err != nil {
39+
// Make sure the destination path exits
40+
if err := os.MkdirAll(dstPath, os.ModePerm); err != nil {
4441
return fmt.Errorf("failed creating destination folder: %w", err)
4542
}
4643

0 commit comments

Comments
 (0)