Skip to content

Commit 3082790

Browse files
author
Morgan Rodgers
committed
Improvements
- Disable useless file selection - Disable telemetry - Update comments
1 parent 44e18cd commit 3082790

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

form.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ attributes:
88
working_dir:
99
label: "Working Directory"
1010
data-filepicker: true
11+
data-target-file-type: dirs # Valid values are: files, dirs, or both
1112
readonly: false
1213
help: "Select your project directory; defaults to $HOME"

template/script.sh.erb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
#!/usr/bin/env bash
2-
<%-
2+
<%-
3+
# Ensure that code-server always starts up in either a user defined directory or the home directory
34
working_dir = Pathname.new(context.working_dir)
45
if ! working_dir.exist? || working_dir.to_s.empty?
56
working_dir = Pathname.new(ENV['HOME'])
67
elsif working_dir.file?
78
working_dir = working_dir.parent
8-
end
9+
end
910
%>
1011

1112
# Ensure a dataroot for Code Server
1213
CODE_SERVER_DATAROOT="$HOME/.local/share/bc_osc_codeserver"
1314
mkdir -p "$CODE_SERVER_DATAROOT/extensions"
1415

16+
# Expose the password to the server
1517
export PASSWORD="$password"
1618

1719
# VSCode complains that system git is too old
@@ -21,9 +23,11 @@ module load git
2123
# Start Code Server
2224
#
2325

26+
# An arbitrary path...
2427
/fs/project/PZS0714/mrodgers/bin/code-server-2.1523-vsc1.38.1 \
2528
--auth=password \
2629
--port="$port" \
30+
--disable-telemetry \
2731
--extra-extensions-dir="$CODE_SERVER_DATAROOT/extensions" \
2832
--user-data-dir="$CODE_SERVER_DATAROOT" \
2933
"<%= working_dir.to_s %>"

0 commit comments

Comments
 (0)