File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,9 @@ var dotenv = require('dotenv');
44var lambda = require ( '../lib/main.js' ) ;
55var program = require ( 'commander' ) ;
66var fs = require ( 'fs' ) ;
7- var packageJsonName = fs . existsSync ( process . cwd ( ) + '/package.json' )
8- ? require ( process . cwd ( ) + '/package.json' ) . name : 'UnnamedFunction' ;
7+ var packageJson = fs . existsSync ( process . cwd ( ) + '/package.json' )
8+ ? require ( process . cwd ( ) + '/package.json' ) : { } ;
9+ var packageJsonName = packageJson . name || 'UnnamedFunction' ;
910
1011dotenv . load ( ) ;
1112
@@ -21,7 +22,7 @@ var AWS_HANDLER = process.env.AWS_HANDLER || 'index.handler';
2122var AWS_ROLE = process . env . AWS_ROLE_ARN || process . env . AWS_ROLE || 'missing' ;
2223var AWS_MEMORY_SIZE = process . env . AWS_MEMORY_SIZE || 128 ;
2324var AWS_TIMEOUT = process . env . AWS_TIMEOUT || 60 ;
24- var AWS_DESCRIPTION = process . env . AWS_DESCRIPTION || '' ;
25+ var AWS_DESCRIPTION = process . env . AWS_DESCRIPTION || packageJson . description || '' ;
2526var AWS_RUNTIME = process . env . AWS_RUNTIME || 'nodejs4.3' ;
2627var AWS_PUBLISH = process . env . AWS_PUBLISH || false ;
2728var AWS_FUNCTION_VERSION = process . env . AWS_FUNCTION_VERSION || '' ;
You can’t perform that action at this time.
0 commit comments