Compare commits

...

7 Commits

Author SHA1 Message Date
Benjamin Ummenhofer 3d15259c89
Merge a5e3bf3ef1 into dd2e9fce27 2024-10-18 22:57:11 +00:00
xfl12345 dd2e9fce27
Fix user rename when restarting container (#7012) 2024-10-18 14:57:08 -08:00
Asher bea906f90b
Install python before npm ci 2024-10-18 11:36:40 -08:00
Asher 15752526bd
Install python3 in cross-compile container
Unsure why this is suddenly missing.
2024-10-18 10:38:44 -08:00
Asher 7c298653f1
Fix import of server-main.js from main
Neglected to update this import when fixing the other.
2024-10-18 10:07:05 -08:00
Benjamin Ummenhofer a5e3bf3ef1
Merge branch 'coder:main' into url_passwd 2024-03-30 06:49:02 +01:00
Benjamin Ummenhofer 175c68295f
get password from the url 2023-03-24 15:05:36 +01:00
4 changed files with 14 additions and 5 deletions

View File

@ -138,8 +138,6 @@ jobs:
package-lock.json
test/package-lock.json
- run: SKIP_SUBMODULE_DEPS=1 npm ci
- name: Install cross-compiler and system dependencies
run: |
dpkg --add-architecture $TARGET_ARCH
@ -151,7 +149,10 @@ jobs:
libsecret-1-dev:$TARGET_ARCH \
libkrb5-dev:$TARGET_ARCH \
ca-certificates \
curl wget rsync gettext-base
curl wget rsync gettext-base \
python3
- run: SKIP_SUBMODULE_DEPS=1 npm ci
- name: Install nfpm
run: |

View File

@ -7,7 +7,7 @@ eval "$(fixuid -q)"
if [ "${DOCKER_USER-}" ]; then
USER="$DOCKER_USER"
if [ "$DOCKER_USER" != "$(whoami)" ]; then
if [ -z "$(id -u "$DOCKER_USER" 2>/dev/null)" ]; then
echo "$DOCKER_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null
# Unfortunately we cannot change $HOME as we cannot move any bind mounts
# nor can we bind mount $HOME into a new home as that requires a privileged container.

View File

@ -56,6 +56,12 @@
if (el) {
el.value = location.href
}
// get password from the url
let url = new URL(window.location.href)
if( url.searchParams.get("session_password") ){
document.getElementsByName("password")[0].value = url.searchParams.get("session_password")
document.getElementsByClassName("submit")[0].click()
}
</script>
</body>
</html>

View File

@ -49,7 +49,9 @@ export interface OpenCommandPipeArgs {
export const runCodeCli = async (args: DefaultedArgs): Promise<void> => {
logger.debug("Running Code CLI")
try {
const mod = require(path.join(vsRootPath, "out/server-main")) as VSCodeModule
// See vscode.loadVSCode for more on this jank.
const modPath = path.join(vsRootPath, "out/server-main.js")
const mod = (await eval(`import("${modPath}")`)) as VSCodeModule
const serverModule = await mod.loadCodeWithNls()
await serverModule.spawnCli(await toCodeArgs(args))
// Rather than have the caller handle errors and exit, spawnCli will exit