The Inbox: System-ct.1213.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: System-ct.1213.mcz

commits-2
Christoph Thiede uploaded a new version of System to project The Inbox:
http://source.squeak.org/inbox/System-ct.1213.mcz

==================== Summary ====================

Name: System-ct.1213
Author: ct
Time: 31 January 2021, 8:25:50.362826 pm
UUID: 389f6bbe-a0cb-764c-815d-369887fc2d39
Ancestors: System-eem.1212

Improves SmalltalkImage>>isHeadless to recognize double-dash arguments correctly.

(It's still not perfect just because one could delete the empty DISPLAY env var on Linux, but accessing env vars in Trunk would probably be a larger project ...)

=============== Diff against System-eem.1212 ===============

Item was changed:
  ----- Method: SmalltalkImage>>isHeadless (in category 'vm parameters') -----
  isHeadless
  "Answer whether the command-line specified to launch the VM headless."
+ | headlessOptions |
+ headlessOptions := #('display=none' '-headless' '-nodisplay' '-vm-display-null')
+ gather: [:option | {option. option copyWithFirst: $-}].
  self optionsDo:
+ [ : each | (headlessOptions includes: each) ifTrue: [ ^ true ] ].
- [ : each | (#('display=none' '-headless' '-nodisplay' '-vm-display-null' ) includes: each) ifTrue: [ ^ true ] ].
  ^ false!