mirror of
https://github.com/deployphp/action.git
synced 2025-03-31 02:16:36 +00:00
Improve version checkings
This commit is contained in:
parent
ba429a2d0e
commit
a5e1911415
1 changed files with 3 additions and 3 deletions
6
index.js
6
index.js
|
@ -74,15 +74,15 @@ async function dep() {
|
|||
if (lock['packages']) {
|
||||
version = lock['packages']
|
||||
.find(p => p.name === 'deployer/deployer')
|
||||
.version
|
||||
?.version
|
||||
}
|
||||
if (version === '' && lock['packages-dev']) {
|
||||
version = lock['packages-dev']
|
||||
.find(p => p.name === 'deployer/deployer')
|
||||
.version
|
||||
?.version
|
||||
}
|
||||
}
|
||||
if (version === '') {
|
||||
if (version === '' || typeof version === 'undefined') {
|
||||
throw new Error('Deployer binary not found. Please specify deployer-binary or deployer-version.')
|
||||
}
|
||||
version = version.replace(/^v/, '')
|
||||
|
|
Loading…
Add table
Reference in a new issue