You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openserverless.apache.org by ms...@apache.org on 2026/08/18 16:51:38 UTC
(openserverless-task) 07/11: Preserve explicit IDE workspace in device login
This is an automated email from the ASF dual-hosted git repository.
sciabarracom pushed a commit to branch 0.9.1
in repository https://gitbox.apache.org/repos/asf/openserverless-task.git
commit c2a97fa8c9e18dfc5d341fa5703aac442f983276
Author: Trustable User <no...@example.com>
AuthorDate: Sun Jul 12 11:06:47 2026 +0200
Preserve explicit IDE workspace in device login
---
ide/docopts.md | 1 +
ide/opsfile.yml | 9 ++++++---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/ide/docopts.md b/ide/docopts.md
index 85821b6..0ff7c38 100644
--- a/ide/docopts.md
+++ b/ide/docopts.md
@@ -68,4 +68,5 @@ Usage:
--fast Skip the initial deployment step and go in incremental update mode
--pin Pin the current auth in the .env to check you are not deploying on the wrong user
--mode this will load from .env.<mode> after .env
+<username> Optional workspace binding; omit it for SSO device flow to use the authenticated identity
```
diff --git a/ide/opsfile.yml b/ide/opsfile.yml
index 78d77ed..89f83dd 100644
--- a/ide/opsfile.yml
+++ b/ide/opsfile.yml
@@ -149,7 +149,7 @@ tasks:
then export OPSDEV_APIHOST="{{._apihost_}}"
fi
echo "*** Configuring Access to OpenServerless ***"
- if test "$SSO_ENABLED" = "true" && test "$OPS_SSO_LOGIN_FLOW" != "password"
+ if test "$SSO_ENABLED" = "true" && test "$OPS_SSO_LOGIN_FLOW" != "password" && test -z "{{._username_}}"
then
OPSDEV_USERNAME=""
elif test -z "{{._username_}}"
@@ -191,7 +191,11 @@ tasks:
else unset OPS_USER
fi
export OPS_APIHOST="$OPSDEV_APIHOST"
- if $OPS -login
+ LOGIN_ARGS=()
+ if test -n "$OPSDEV_USERNAME"
+ then LOGIN_ARGS=("$OPSDEV_USERNAME")
+ fi
+ if $OPS -login "${LOGIN_ARGS[@]}"
then
source ~/.wskprops
if test -z "$OPSDEV_USERNAME"
@@ -389,4 +393,3 @@ tasks:
nodejs:
desc: nodejs subcommand
-