--- salt/states/file.py 2019-03-05 23:17:37.880170000 +0000 +++ salt/states/file.py 2019-03-05 23:19:50.939310000 +0000 @@ -2742,8 +2742,10 @@ elif ret['pchanges']: ret['result'] = None ret['comment'] = 'The file {0} is set to be changed'.format(name) - if 'diff' in ret['pchanges'] and not show_changes: - ret['pchanges']['diff'] = '' + if show_changes and 'diff' in ret['pchanges']: + ret['changes']['diff'] = ret['pchanges']['diff'] + if not show_changes: + ret['changes']['diff'] = '' else: ret['result'] = True ret['comment'] = 'The file {0} is in the correct state'.format(name)