refactor: improve session action handling in play_core

- Clean up `play_core` by removing dead code and unused imports
- Check `action.name` directly instead of param existence
- Allow 'value' as an alias for 'val' in session env actions
- Use `env_set` for `env_set_once` to avoid duplicate errors
This commit is contained in:
Mahmoud-Emad
2025-07-31 17:59:44 +03:00
parent 697c500e35
commit 198a394be8
2 changed files with 15 additions and 31 deletions

View File

@@ -77,7 +77,6 @@ pub fn (mut self Session) env_set_once(key string, value string) ! {
self.env_set(key, value)!
}
// Get an environment variable
pub fn (mut self Session) env_get(key string) !string {
return self.env[key] or { return error("can't find env in session ${self.name}") }