File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed
Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
55The format is based on [ Keep a Changelog] ( http://keepachangelog.com/ ) and this project adheres to [ Semantic Versioning] ( http://semver.org/ ) .
66
7+ ## [ 1.29.1]
8+
9+ - Fix for env configuration check that sometimes causes an error.
10+
711## [ 1.29.0]
812
913- Xdebug Cloud support.
Original file line number Diff line number Diff line change @@ -414,7 +414,12 @@ class PhpDebugSession extends vscode.DebugSession {
414414 } )
415415 try {
416416 // Some checks
417- if ( args . env !== undefined && args . program === undefined && args . runtimeArgs === undefined ) {
417+ if (
418+ args . env &&
419+ Object . keys ( args . env ) . length !== 0 &&
420+ args . program === undefined &&
421+ args . runtimeArgs === undefined
422+ ) {
418423 throw new Error (
419424 `Cannot set env without running a program.\nPlease remove env from [${
420425 args . name || 'unknown'
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ describe('PHP Debug Adapter', () => {
4141 ) )
4242
4343 it ( 'should error on env without program' , ( ) =>
44- assert . isRejected ( Promise . all ( [ client . launch ( { env : { } } ) , client . configurationSequence ( ) ] ) ) )
44+ assert . isRejected ( Promise . all ( [ client . launch ( { env : { some : 'key' } } ) , client . configurationSequence ( ) ] ) ) )
4545
4646 it ( 'should run program to the end' , ( ) =>
4747 Promise . all ( [
You can’t perform that action at this time.
0 commit comments