phyver / GameShell

a game to learn (or teach) how to use standard commands in a Unix shell
GNU General Public License v3.0
2.13k stars 135 forks source link

Error on the verification of the use of the head command #60

Closed HdG-0 closed 3 years ago

HdG-0 commented 3 years ago

I just discovered GameShell (and I think it's really great!) but I'm stuck at mission 22 because I don't use the head command even though I use it.

Details :

Thanks for your work on this really cool project :)

phyver commented 3 years ago

Thanks!

Can you give me the output of gsh systemconfig?

Also, try running the following command

[mission 22] sed -i '5s/$/\necho ">>> FC -LNR";. fc-lnr.sh; echo "<<<DONE";/' "$GSH_MISSIONS/pipe_intro_book_of_potions/01_head/check.sh"

and then trying to complete the mission.

gsh check should output something of the form

>>> FC -LNR
...
...
<<<DONE

There should be the commands you've run, in reverse order. Can you give me

phyver commented 3 years ago

Ah! I think I know what happens. That's because of the alias gc=gsh check`. I'll try fixing it.

In the meantime, don't use your alias to check the missions with Servillus. :(

phyver commented 3 years ago

Can you confirm the last commit (a98e4ea2) fixes the problem?

HdG-0 commented 3 years ago

It is good! Everything works! Thank you and sorry for the delay :)

oupala commented 2 years ago

I'd like this issue to be reopened because I'm also stuck at mission 22 even if I have the lastest version of GameShell:

[mission 22] $ cd ~/Mountain/Cave/Book_of_potions
[mission 22] $ head -n 6 page_07 
Herbal tea
----------

1) Boil water.
2) Add herbs from the forest.
3) Let it sit for five minutes and drink while hot.
[mission 22] $ gsh check
You altered the book...

Sorry, mission 22 hasn't been completed.

  |                                    |
--+------------------------------------+--
  | Use the command                    |
  |     $ gsh help                     |
  | to get the list of "gsh" commands. |
--+------------------------------------+--
  |                                    |

[mission 22] $ 

I can also open a new issue if it is clearer for you.

oupala commented 2 years ago

I have the same problem with mission 23:

[mission 23] $ cd ~/Mountain/Cave/Book_of_potions
[mission 23] $ tail -9 page_12
1) Boil water in a cauldron.
2) Add in a few death caps (Amanita phalloides).
3) Also add a few fly agarics (Amanita muscaria).
4) And some destroying angels (Amanita virosa).
5) Mix in a few deadly webcaps (Cortinarius rubellus).
6) Feel free to add in any colourful fungi you have on hand.
7) Let half of the water evaporate.
8) Season with a pinch of salt and a few herbs.
9) Serve hot in a bowl.
[mission 23] $ gc
You altered the book...

Sorry, mission 23 hasn't been completed.

  |                                    |
--+------------------------------------+--
  | Use the command                    |
  |     $ gsh help                     |
  | to get the list of "gsh" commands. |
--+------------------------------------+--
  |                                    |

[mission 23] $

Could there be a link with the fast that I am playing GameShell inside a container, the image being built from the Dockerfile?

oupala commented 2 years ago

I found the reason for this mission 23:

[mission 24] $ pwd
/home/gsh-user/gameshell/World/Mountain/Cave/Book_of_potions

The problem is that the fact that I was not with Servillus was not catched by GameShell, so the error message was wrong or incomplete (and at least not understandable).

[mission 23] $ tail -9 Book_of_potions/page_12 
1) Boil water in a cauldron.
2) Add in a few death caps (Amanita phalloides).
3) Also add a few fly agarics (Amanita muscaria).
4) And some destroying angels (Amanita virosa).
5) Mix in a few deadly webcaps (Cortinarius rubellus).
6) Feel free to add in any colourful fungi you have on hand.
7) Let half of the water evaporate.
8) Season with a pinch of salt and a few herbs.
9) Serve hot in a bowl.
[mission 23] $ gc

Congratulations, mission 23 has been successfully completed!
oupala commented 2 years ago

Same fix for mission 22: I had to be outside of the book, with Servillus.

However, the problem was not catched by GameShell, so the error message was wrong or incomplete (and at least not understandable for me).

phyver commented 2 years ago

Apparently, you modified the directory containing the book of potions. You might have modified a page or created a file. Does that make sense?

Currently, checking the directory Book_of_potions for changes is done first in check.sh, giving the message "You altered the book..." It might be better to first check that the player is standing with Servilus first, and then check integrity of the directory. The error message could also be made more precise.

There actually is a real bug in that spurious files in Book_of_potions aren't removed when the mission (re)-starts. That will hopefully be fixed in a few minutes...

I opened a new issue to continue the discussion : #64

oupala commented 2 years ago

In fact, the issue that I am mentionning for missions 22 and 23 are not due to a modified file in the book of potion. It is only due to being into the book of potion instead of being just in the cave.

I changed my messages above (messages no1 and no2 of October 26th) so it is easier to reproduce the issue (that I'm reproducing with the last Dockerfile from GitHub).