Skip to content

Commit b0f6be0

Browse files
committed
added correction for path in windows
1 parent ec3bbf9 commit b0f6be0

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

examples/Workspaces/eg002AddDocumentToWorkspace.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,13 @@ declare -a Headers=(
3636
#ds-snippet-end:Workspaces2Step2
3737

3838
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
39-
DEMO_DOCS_PATH="$(cd "$SCRIPT_DIR/../../demo_documents" && pwd)"
39+
DEMO_DOCS_PATH_UNIX="$(cd "$SCRIPT_DIR/../../demo_documents" && pwd)"
40+
41+
if command -v cygpath >/dev/null 2>&1; then
42+
DEMO_DOCS_PATH="$(cygpath -w "$DEMO_DOCS_PATH_UNIX")"
43+
else
44+
DEMO_DOCS_PATH="$DEMO_DOCS_PATH_UNIX"
45+
fi
4046

4147
# Upload the file path to be added to the workspace
4248
#ds-snippet-start:Workspaces2Step3

0 commit comments

Comments
 (0)