File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -8,5 +8,6 @@ attributes:
8
8
working_dir :
9
9
label : " Working Directory"
10
10
data-filepicker : true
11
+ data-target-file-type : dirs # Valid values are: files, dirs, or both
11
12
readonly : false
12
13
help : " Select your project directory; defaults to $HOME"
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
- < %-
2
+ < %-
3
+ # Ensure that code-server always starts up in either a user defined directory or the home directory
3
4
working_dir = Pathname.new(context.working_dir)
4
5
if ! working_dir.exist? || working_dir.to_s.empty?
5
6
working_dir = Pathname.new(ENV[' HOME' ])
6
7
elsif working_dir.file?
7
8
working_dir = working_dir.parent
8
- end
9
+ end
9
10
%>
10
11
11
12
# Ensure a dataroot for Code Server
12
13
CODE_SERVER_DATAROOT=" $HOME /.local/share/bc_osc_codeserver"
13
14
mkdir -p " $CODE_SERVER_DATAROOT /extensions"
14
15
16
+ # Expose the password to the server
15
17
export PASSWORD=" $password "
16
18
17
19
# VSCode complains that system git is too old
@@ -21,9 +23,11 @@ module load git
21
23
# Start Code Server
22
24
#
23
25
26
+ # An arbitrary path...
24
27
/fs/project/PZS0714/mrodgers/bin/code-server-2.1523-vsc1.38.1 \
25
28
--auth=password \
26
29
--port=" $port " \
30
+ --disable-telemetry \
27
31
--extra-extensions-dir=" $CODE_SERVER_DATAROOT /extensions" \
28
32
--user-data-dir=" $CODE_SERVER_DATAROOT " \
29
33
" <%= working_dir.to_s %>"
You can’t perform that action at this time.
0 commit comments