[squeak-dev] The Trunk: System-cmm.1368.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Sep 8 04:44:28 UTC 2022
Chris Muller uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-cmm.1368.mcz
==================== Summary ====================
Name: System-cmm.1368
Author: cmm
Time: 7 September 2022, 11:44:24.530988 pm
UUID: 1e9cce91-389c-4e8f-9fb2-05714f748ca4
Ancestors: System-ct.1367
When Squeak is run headless with a syntax error in the startup document, report it to the terminal and exit rather than leave the process hung with no output clues.
=============== Diff against System-ct.1367 ===============
Item was changed:
----- Method: CodeLoader>>installSourceFile: (in category 'installing') -----
installSourceFile: aStream
"Install the previously loaded source file"
| contents trusted |
aStream ifNil:[^self error:'No content to install'].
trusted := SecurityManager default positionToSecureContentsOf: aStream.
trusted ifFalse:[(SecurityManager default enterRestrictedMode)
ifFalse:[ aStream close.
^ self error:'Insecure content encountered']].
contents := self allButShebangLine: aStream upToEnd unzipped asString.
(aStream respondsTo: #close) ifTrue:[aStream close].
+ ^[contents readStream fileIn]
+ on: SyntaxErrorNotification
+ do: [ : err | Smalltalk isHeadless
+ ifTrue:
+ [FileStream stdout nextPutAll: err errorCode; cr; flush.
+ Smalltalk snapshot: false andQuit: true ]
+ ifFalse: [err pass] ]!
- ^contents readStream fileIn!
More information about the Squeak-dev
mailing list
|