Skip to content

Commit 85b72a4

Browse files
committed
test symlink
1 parent be032fa commit 85b72a4

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

acceptance/dlt/install-dlt/output.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ dlt init is not yet implemented. This will initialize a new DLT project in the f
66
=== dlt file exists, should not overwrite
77
>>> errcode [CLI] install-dlt -d tmpdir
88
dlt successfully installed to the directory "tmpdir"
9+
[DLT] -> [CLI]
910

1011
=== Executable not called as databricks
1112
>>> errcode ./notdatabricks install-dlt

acceptance/dlt/install-dlt/script

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ title "dlt file exists, should not overwrite"
55
mkdir -p tmpdir
66
touch tmpdir/dlt
77
trace errcode $CLI install-dlt -d tmpdir
8+
if [[ "$OSTYPE" == "msys" ]]; then
9+
echo "$DLT -> $(realpath "$DLT" | sed 's/\.exe$//')"
10+
else
11+
echo "$DLT -> $(realpath "$DLT")"
12+
fi
813
rm -rf tmpdir
914

1015
title "Executable not called as databricks"

cmd/dlt/install_dlt.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"fmt"
77
"os"
88
"path/filepath"
9-
"runtime"
109

1110
"github.com/databricks/cli/libs/cmdio"
1211
"github.com/spf13/cobra"
@@ -27,9 +26,6 @@ func InstallDLTSymlink(directory string) error {
2726
dir = filepath.Dir(path)
2827
}
2928
dltPath := filepath.Join(dir, "dlt")
30-
if runtime.GOOS == "windows" {
31-
dltPath += ".exe"
32-
}
3329

3430
if fi, err := os.Lstat(dltPath); err == nil {
3531
if fi.Mode()&os.ModeSymlink != 0 {

0 commit comments

Comments
 (0)