product:deselect

Introduction

product:deselect clears the active product and puts the workspace in detached mode. You need it for the commands that only run with no product selected, such as product:create and most spl:* commands.

splent product:deselect
  Product deselected.
  Run: unset SPLENT_APP

It removes SPLENT_APP from the workspace .env, and your prompt changes from (my_first_app) /workspace$ to (detached) /workspace$. Run unset SPLENT_APP to clear it from the current shell too. Already detached, it prints Already in detached mode. and changes nothing.


Deselecting from a script

eval "$(splent product:deselect --shell)"

--shell prints unset SPLENT_APP instead of the messages, so a script or a prompt can eval it. The workspace .env is written either way.


Commands that need detached mode

Command What it does
product:create Creates a product, unless you pass --no-select
spl:create, spl:list, spl:info, spl:fetch Create, list, describe and fetch SPLs
spl:features, spl:deps, spl:configurations, spl:compare, spl:outdated Query an SPL model
spl:add-feature, spl:remove-feature, spl:add-constraints Edit an SPL model

spl:pin works on the selected product, and spl:publish runs either way. product:test --product <name> also works in both modes.


Staying selected

Deselecting changes the product of every command, agent and release gate of the workspace. To run one command detached and keep the selection, give it an empty SPLENT_APP.

SPLENT_APP= splent spl:list

To create a product while another one is selected, use product:create --no-select. See Another product for one command.


Reference

Option Description
--shell Print unset SPLENT_APP instead of the messages, for eval

See also


Back to top

splent. Distributed by an LGPL license v3. Contact us: drorganvidez@us.es