Skip to content

Commit 86817ea

Browse files
committed
docs(atuin PR2543): step to set temporary files
fix as explained at atuinsh/atuin#2543 (comment)
1 parent 55b1827 commit 86817ea

File tree

1 file changed

+29
-10
lines changed

1 file changed

+29
-10
lines changed

atuin-tests/pr2543/README.md

+29-10
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Link to Pull Request (PR): [#2543 Add PowerShell module](https://github.com/atui
1313

1414
### Test on Windows 11
1515

16+
Run on 2025-01-13
17+
1618
```sh
1719
# Remove any installed atuin binary
1820
cargo uninstall atuin
@@ -28,14 +30,25 @@ git checkout powershell-pr
2830
cargo build --release
2931

3032
cd target/release
31-
# Run installation per https://github.com/atuinsh/atuin/pull/2543
33+
34+
# Run installation per steps explained in first post of https://github.com/atuinsh/atuin/pull/2543
35+
3236
# Temporarily add atuin to path
33-
$Env:Path += ";path/to/target/release"
37+
$Env:Path += ";path\to\target\release"
38+
# Temporarily change where atuin stores it's database
39+
# Set environment variables to temporary files
40+
# Otherwise, existing database schema will be migrated to a new format, and
41+
# you will have to stay with the Atuin version from this test branch
42+
mkdir $Env:USERPROFILE\tempatuin
43+
$env:ATUIN_DB_PATH = "$Env:USERPROFILE\tempatuin\temp_atuin_dev.db"
44+
$env:ATUIN_RECORD_STORE_PATH = "$Env:USERPROFILE\tempatuin\temp_atuin_records.db"
3445

3546
# Verify path change and location of binary
3647
$Env:Path
3748
# Check atuin points to the PR version
3849
Get-Command "atuin"
50+
51+
# Install
3952
atuin init powershell | Out-String | Invoke-Expression
4053

4154
# Type some commands like ls, cd ...
@@ -59,6 +72,10 @@ atuin search -i
5972

6073
```
6174

75+
### Clean up Test Environment
76+
77+
- Remove the directory `$Env:USERPROFILE\tempatuin` and test branch release files if desired.
78+
6279
## Test Environment and Versions
6380

6481
From tests run on 2025-01-12
@@ -131,9 +148,11 @@ nu --version
131148

132149
```
133150

134-
## Error: migration 20230531212437 and Fix to Delete Old Files
151+
## Error: migration 20230531212437 and Fix
152+
153+
The error below was encountered during testing and a fix is listed below.
135154

136-
The error below was encountered during testing and a fix is listed below.
155+
It is not related to changes in the pull request (PR) and is due to changes in the main branch of Atuin. It occurs during testing if the steps to temporarily change where atuin stores it's database are not done.
137156

138157
```sh
139158

@@ -159,13 +178,13 @@ Check the spelling of the name, or if a path was included, verify that the path
159178

160179
```
161180
162-
The error also occurs when testing with atuin/main in nushell in the same environment, so error
163-
is not caused by changes in the PR.
164-
165181
### Fix
166182
167-
It was found that files in `~/.local/share/atuin` were causing issues with the install.
183+
- During testing, run the commands in the "Test on Windows 11" section under comment `# Temporarily change where atuin stores it's database`, then retry tests.
184+
185+
#### Explanation
186+
187+
If the step was not done, Atuin will try to migrate the database schema to a new format and files in `~/.local/share/atuin` will be an issue.
168188

169-
- There was a problem with the local `~/.local/share/atuin/records.db`. Fix was to delete `records.db` and have a new one generated.
189+
- The local `~/.local/share/atuin/records.db` will attempt to be migrated. A not recommended fix is to delete `records.db` and have a new one generated.
170190
- The system could run powershell and nushell fine with atuin and they successfully shared `~/.local/share/atuin/`
171-
- System could run powershell and nushell fine and they share that directory.

0 commit comments

Comments
 (0)