File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -171,9 +171,18 @@ switch (argv._[0]) {
171
171
break ;
172
172
173
173
case 'execute' :
174
- const adaptorVersion = argv . language . substring (
175
- argv . language . lastIndexOf ( '/' ) + 1
176
- ) ;
174
+ const fs = require ( 'fs' ) ;
175
+ let adaptorVersion ;
176
+ try {
177
+ const path = argv . language ;
178
+ const rawdata = fs . readFileSync (
179
+ path . substring ( 0 , path . lastIndexOf ( 'Adaptor' ) - 1 ) + '/package.json'
180
+ ) ;
181
+ const package = JSON . parse ( rawdata ) ;
182
+ adaptorVersion = `${ package . name } #v${ package . version } ` ;
183
+ } catch ( error ) {
184
+ adaptorVersion = argv . language ;
185
+ }
177
186
178
187
const debug = `│ ◰ ◱ ◲ ◳ OpenFn/core ~ ${ adaptorVersion } (Node ${ process . version } ) │` ;
179
188
console . log ( '╭' + '─' . repeat ( debug . length - 2 ) + '╮' ) ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " core" ,
3
- "version" : " 1.3.7 " ,
3
+ "version" : " 1.3.8 " ,
4
4
"description" : " The central job processing program used in the OpenFn platform." ,
5
5
"repository" : {
6
6
"type" : " git" ,
You can’t perform that action at this time.
0 commit comments