Skip to content

Commit be11691

Browse files
authored
Merge pull request #62 from Luke-Roy-IBM/fix-issue-61
Add force flag to plugin install
2 parents c7b424b + 23e785f commit be11691

File tree

4 files changed

+37
-3
lines changed

4 files changed

+37
-3
lines changed

.github/workflows/test.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,40 @@ jobs:
151151
ibmcloud plugin list | grep -q '^secrets-manager\b' &&
152152
ibmcloud plugin list | grep -q '^container-registry\b.\+1\.3\.\b'
153153
154+
test-plugins-already-installed:
155+
runs-on: ubuntu-latest
156+
steps:
157+
- uses: actions/checkout@v6
158+
- name: Set up ibmcloud CLI
159+
uses: ./
160+
with:
161+
plugins: container-service
162+
- name: Set up ibmcloud CLI (again)
163+
uses: ./
164+
with:
165+
plugins: container-service secrets-manager
166+
- name: Check plugins are installed
167+
run: |
168+
ibmcloud plugin list | grep -q '^container-service\b' &&
169+
ibmcloud plugin list | grep -q '^secrets-manager\b'
170+
171+
test-plugins-already-installed-with-older-versions:
172+
runs-on: ubuntu-latest
173+
steps:
174+
- uses: actions/checkout@v6
175+
- name: Set up ibmcloud CLI
176+
uses: ./
177+
with:
178+
plugins: container-service@0.4.102
179+
- name: Set up ibmcloud CLI (again)
180+
uses: ./
181+
with:
182+
plugins: container-service secrets-manager
183+
- name: Check plugins are installed
184+
run: |
185+
ibmcloud plugin list | grep -q '^container-service\b' &&
186+
ibmcloud plugin list | grep -q '^secrets-manager\b'
187+
154188
test-login:
155189
runs-on: ubuntu-latest
156190
steps:

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ async function installPlugins() {
6767
const plugins = core.getInput('plugins').replace(/\n/g, ' ').replace(/,/g, ' ').split(' ').map(p => p.trim()).filter(p => p)
6868
if (plugins.length > 0) {
6969
core.startGroup('Installing IBM Cloud CLI plugins')
70-
await exec.exec('ibmcloud', ['plugin', 'install', ...plugins])
70+
await exec.exec('ibmcloud', ['plugin', 'install', ...plugins, '-f'])
7171
core.endGroup()
7272
await exec.exec('ibmcloud', ['plugin', 'list'])
7373
}

0 commit comments

Comments
 (0)