aboutsummaryrefslogtreecommitdiff
path: root/awwan_sudo_test.go
AgeCommit message (Collapse)Author
2026-02-15all: fix chmod/chown if destination is directoryShulhan
Given the following command #put!+0644 src/file dst/ If the dst is a directory, it would cause the directory permission changes to 0644. This changes fix it by checking if the destination is a directory first. If we cannot stat the dst, skip the chmod/chown command.
2024-03-22all: replace module "share" with "pakakeh.go"Shulhan
The "share" project has been moved to SourceHut with new name "pakakeh.go".
2023-12-22all: add [context.Context] to Local and PlayShulhan
Passing context allow the command Local or Play to be cancelled when running in asynchronous mode, in this case when awwan run with WUI.
2023-11-16all: refactoring, rename Request to ExecRequestShulhan
2023-10-30all: log all execution into fileShulhan
For each script execution, a file suffixed with ".log" will be created in the same directory with the same name as script file. For example, if the script is path is "a/b/c.aww" then the log file would named "a/b/c.aww.log". This is to provides history and audit in the future.
2023-10-21all: implement local "#get!" and "#put!" with owner and modeShulhan
In local environment, using magic command "#get!" or "#put!" with owner and mode set, like "#get:$USER:$GROUP+$MODE" or "#put:$USER:$GROUP+MODE", will changes the file owner to $USER or $GROUP and/or permission to $MODE.
2023-10-14all: add integration tests for local "#put!"Shulhan
2023-10-14all: rewrite TestAwwan_Local_SudoGet to use mockStdinShulhan
While at it, * rename variable mockrw to mockTerm for readibility, * remove carriage return character from sudo password.
2023-10-12all: add integration tests for magic command "#get!"Shulhan